Fix regression with nova-manage floating list

Fixes bug #1032177

If a floating IP is not associated with an instance, nova-manage fails
with:

  local variable 'instance_uuid' referenced before assignment

This is a regression introduced by commit fc82c6d. Simply rename
the local variable to instance_uuid.

Change-Id: Ia6df23c945f0815c65bcfd2f49e8ba3225d03d7f
This commit is contained in:
Ray Sun
2012-08-02 21:13:33 +08:00
parent 4157be7638
commit ee7108d786

View File

@@ -411,7 +411,7 @@ class FloatingIpCommands(object):
print _("No floating IP addresses have been defined.")
return
for floating_ip in floating_ips:
instance_id = None
instance_uuid = None
if floating_ip['fixed_ip_id']:
fixed_ip = db.fixed_ip_get(ctxt, floating_ip['fixed_ip_id'])
instance_uuid = fixed_ip['instance_uuid']