Wrong comparisons with "in" operator
Bug #1248443 reported by
Alvaro Lopez
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Fix Released
|
Undecided
|
Alvaro Lopez |
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"):
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://
Changed in nova: | |
assignee: | nobody → Alvaro Lopez (aloga) |
status: | New → In Progress |
Changed in nova: | |
milestone: | none → icehouse-1 |
Changed in nova: | |
status: | Fix Committed → Fix Released |
Changed in nova: | |
milestone: | icehouse-1 → 2014.1 |
To post a comment you must log in.
Fix proposed to branch: master /review. openstack. org/55362
Review: https:/