Add breaks to for loops

This just adds breaks to a couple of matching for loops in instance.py.

Fixes: bug #1130898
Change-Id: Iacfa040ba3a400b506e4fbc63c513eb3e67ecb11
This commit is contained in:
Ian Main 2013-02-28 18:03:26 -08:00
parent c538c6b6e4
commit a7d22ff1e2
1 changed files with 2 additions and 0 deletions

View File

@ -238,6 +238,7 @@ class Instance(resource.Resource):
for o in image_list:
if o.name == image_name:
image_id = o.id
break
if image_id is None:
logger.info("Image %s was not found in glance" % image_name)
@ -248,6 +249,7 @@ class Instance(resource.Resource):
for o in flavor_list:
if o.name == flavor:
flavor_id = o.id
break
if flavor_id is None:
raise exception.FlavorMissing(flavor_id=flavor)