Comment 12 for bug 1648207

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/409549
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=78e621faf757e3bf4bd8475c29090bb1c83bc0cd
Submitter: Jenkins
Branch: master

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.

    Change-Id: I6bf5a6e9c9eed4bbcf6678467df19dfea560b4de
    Closes-Bug: #1648207