← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1648207] [NEW] Bug in Python API "!=" doesn't behave as expected for base.Resource objects

 

Public bug reported:

The result of some OpenStack objects, for example a server or a volume,
do not compare with None as expected. For example if a server has been
found and is clearly not None (e.g. I can print out its name) the test
"server!=None" will be False. This really isn't the expected behavior. I
can worked around this by using the "server is not None" but this would
make bugs appear very easily if I slip back into "!=" which is my usual
habit, and could be other's habit as well. I have attached a simple
script which should reproduce the bug.

** Affects: python-novaclient
     Importance: Low
         Status: Confirmed

** Attachment added: "Illustrates the bug"
   https://bugs.launchpad.net/bugs/1648207/+attachment/4788738/+files/none_test_bug.py

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1648207

Title:
  Bug in Python API "!=" doesn't behave as expected for base.Resource
  objects

Status in python-novaclient:
  Confirmed

Bug description:
  The result of some OpenStack objects, for example a server or a
  volume, do not compare with None as expected. For example if a server
  has been found and is clearly not None (e.g. I can print out its name)
  the test "server!=None" will be False. This really isn't the expected
  behavior. I can worked around this by using the "server is not None"
  but this would make bugs appear very easily if I slip back into "!="
  which is my usual habit, and could be other's habit as well. I have
  attached a simple script which should reproduce the bug.

To manage notifications about this bug go to:
https://bugs.launchpad.net/python-novaclient/+bug/1648207/+subscriptions


Follow ups