Fix and enable flake8 F823
F823 local variable 'blah' (defined in enclosing scope on line xx) referenced before assignment Change-Id: I721e1339ef023558032980bbf59e8dc44b391d52
This commit is contained in:
@@ -31,8 +31,8 @@ class InstanceTypeTestCase(test.TestCase):
|
|||||||
def _generate_name(self):
|
def _generate_name(self):
|
||||||
"""return a name not in the DB."""
|
"""return a name not in the DB."""
|
||||||
nonexistent_flavor = str(int(time.time()))
|
nonexistent_flavor = str(int(time.time()))
|
||||||
flavors = flavors.get_all_types()
|
all_flavors = flavors.get_all_types()
|
||||||
while nonexistent_flavor in flavors:
|
while nonexistent_flavor in all_flavors:
|
||||||
nonexistent_flavor += "z"
|
nonexistent_flavor += "z"
|
||||||
else:
|
else:
|
||||||
return nonexistent_flavor
|
return nonexistent_flavor
|
||||||
|
|||||||
Reference in New Issue
Block a user