Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenStack
oslo
python-oslo.versionedobjects
Commits
15ca1e38
Commit
15ca1e38
authored
Jul 13, 2017
by
Jenkins
Committed by
Gerrit Code Review
Jul 13, 2017
Browse files
Merge "Fix the object is unhashable when inheriting the class "ComparableVersionedObject""
parents
578b23b6
c4d7b10e
Changes
1
Hide whitespace changes
Inline
Side-by-side
oslo_versionedobjects/base.py
View file @
15ca1e38
...
...
@@ -706,6 +706,9 @@ class ComparableVersionedObject(object):
return
self
.
obj_to_primitive
()
==
obj
.
obj_to_primitive
()
return
NotImplemented
def
__hash__
(
self
):
return
super
(
ComparableVersionedObject
,
self
).
__hash__
()
def
__ne__
(
self
,
obj
):
if
hasattr
(
obj
,
'obj_to_primitive'
):
return
self
.
obj_to_primitive
()
!=
obj
.
obj_to_primitive
()
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment