commit 78e621faf757e3bf4bd8475c29090bb1c83bc0cd
Author: Akshil Verma <email address hidden>
Date: Sun Dec 11 13:37:25 2016 -0600
Fixed the __ne__ implementation in base.Resource
Any object of Resource class or its child class do not compare with
None as expected. For example if a server has been found and is
clearly not None, the test "server!=None" will be False.
This was occuring because the __eq__ implementation was returning the
'NotImplemented' keyword and the __ne__ implementation was returning
the not of __eq__, which in this case will return False as the
expected python behavior for a the not of NotImplemented is False.
Changed the __ne__ implementation to return the correct boolean value
and added the test case that fails with the older implementation and
passes in the current fix.
Reviewed: https:/ /review. openstack. org/409549 /git.openstack. org/cgit/ openstack/ python- novaclient/ commit/ ?id=78e621faf75 7e3bf4bd8475c29 090bb1c83bc0cd
Committed: https:/
Submitter: Jenkins
Branch: master
commit 78e621faf757e3b f4bd8475c29090b b1c83bc0cd
Author: Akshil Verma <email address hidden>
Date: Sun Dec 11 13:37:25 2016 -0600
Fixed the __ne__ implementation in base.Resource
Any object of Resource class or its child class do not compare with
None as expected. For example if a server has been found and is
clearly not None, the test "server!=None" will be False.
This was occuring because the __eq__ implementation was returning the nted' keyword and the __ne__ implementation was returning
'NotImpleme
the not of __eq__, which in this case will return False as the
expected python behavior for a the not of NotImplemented is False.
Changed the __ne__ implementation to return the correct boolean value
and added the test case that fails with the older implementation and
passes in the current fix.
Change-Id: I6bf5a6e9c9eed4 bbcf6678467df19 dfea560b4de
Closes-Bug: #1648207