From 505e89c6245d39522f0b082a28ed0b8c56575fa1 Mon Sep 17 00:00:00 2001 From: Joe Gordon Date: Tue, 28 May 2013 06:59:13 +0300 Subject: [PATCH] Fix and enable flake8 F823 F823 local variable 'blah' (defined in enclosing scope on line xx) referenced before assignment Change-Id: I721e1339ef023558032980bbf59e8dc44b391d52 --- nova/tests/test_instance_types.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nova/tests/test_instance_types.py b/nova/tests/test_instance_types.py index e20845f1..d8a91573 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