yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #06524
[Bug 1248443] Re: Wrong comparisons with "in" operator
** Changed in: nova
Status: Fix Committed => Fix Released
--
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/1248443
Title:
Wrong comparisons with "in" operator
Status in OpenStack Compute (Nova):
Fix Released
Bug description:
In the code there are several comparisons using the "in" operator to
check if a value occurs in a tuple with only one element, like:
if a in ("foo"):
do_something()
This comparison is wrong, since that is not a tuple with one element
[1], therefore if the variable "a" had a value of "f" it will match.
[1] http://docs.python.org/2/tutorial/datastructures.html#tuples-and-
sequences
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1248443/+subscriptions