summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoe Gordon <joe.gordon0@gmail.com>2013-05-28 06:59:13 +0300
committerJoe Gordon <joe.gordon0@gmail.com>2013-05-28 23:04:44 +0200
commitd534b290a12235f4e6d9afcbfb9d3aba4486e6cc (patch)
treed3c12f03cf0c9e5fa9e9a5ddf09fc5b37220f9e9
parentd9c145c7b86f7cc8807ec4c63fd2cbdad17794ab (diff)
downloadnova-d534b290a12235f4e6d9afcbfb9d3aba4486e6cc.tar.gz
nova-d534b290a12235f4e6d9afcbfb9d3aba4486e6cc.tar.xz
nova-d534b290a12235f4e6d9afcbfb9d3aba4486e6cc.zip
Fix and enable flake8 F823
F823 local variable 'blah' (defined in enclosing scope on line xx) referenced before assignment Change-Id: I721e1339ef023558032980bbf59e8dc44b391d52
-rw-r--r--nova/tests/test_instance_types.py4
-rw-r--r--tox.ini2
2 files changed, 3 insertions, 3 deletions
diff --git a/nova/tests/test_instance_types.py b/nova/tests/test_instance_types.py
index e20845f1d..d8a915730 100644
--- a/nova/tests/test_instance_types.py
+++ b/nova/tests/test_instance_types.py
@@ -31,8 +31,8 @@ class InstanceTypeTestCase(test.TestCase):
def _generate_name(self):
"""return a name not in the DB."""
nonexistent_flavor = str(int(time.time()))
- flavors = flavors.get_all_types()
- while nonexistent_flavor in flavors:
+ all_flavors = flavors.get_all_types()
+ while nonexistent_flavor in all_flavors:
nonexistent_flavor += "z"
else:
return nonexistent_flavor
diff --git a/tox.ini b/tox.ini
index 218f52b75..44135b88a 100644
--- a/tox.ini
+++ b/tox.ini
@@ -40,7 +40,7 @@ commands =
commands = {posargs}
[flake8]
-ignore = E12,E711,E712,H302,H303,H403,H404,F403,F811,F823,F841
+ignore = E12,E711,E712,H302,H303,H403,H404,F403,F811,F841
builtins = _
exclude = .venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build,plugins,tools