fix return of image_list

This commit is contained in:
Florian Ermisch 2015-06-29 16:26:15 +02:00
parent 9f923edfab
commit a47509e7dd

View File

@ -306,7 +306,7 @@ def image_list(id=None, profile=None): # pylint: disable=C0103
# Those cause AttributeErrors in Icehouse' glanceclient
for attr in ['container_format', 'disk_format', 'size']:
if image.has_key(attr):
ret[attr] = image[attr]
ret[image.name][attr] = image[attr]
if id == image.id:
return ret[image.name]
return ret