mirror of
https://github.com/saltstack/salt.git
synced 2025-04-16 01:30:20 +00:00
Allow the Version
class to be dictionary keys
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
parent
a928c91f30
commit
a020f3993d
1 changed files with 3 additions and 0 deletions
|
@ -114,3 +114,6 @@ class Version(packaging.version.Version):
|
|||
if not isinstance(other, self.__class__):
|
||||
other = self.__class__(other)
|
||||
return super().__ne__(other)
|
||||
|
||||
def __hash__(self):
|
||||
return hash(str(self))
|
||||
|
|
Loading…
Add table
Reference in a new issue