Consistently hash Version objects

The semantic_version.Version objects don't properly support hashing,
so we need to handle that in our wrapper, so that the "in" operator
can work properly with sets and dicts.

Closes-Bug: #1649819
Change-Id: I85e2b2214546817ef4da136b7d4267985ced94dc
This commit is contained in:
Radomir Dopieralski 2017-03-09 18:40:25 +01:00
parent cd42abb766
commit 7be8078910

View File

@ -49,7 +49,7 @@ class Version(object):
return str(self.version)
def __hash__(self):
return hash(self.version)
return hash(str(self.version))
class APIVersionManager(object):