Always return a list from VolumeTableMixIn._get*

Returning None from these methods leads to TypeError
(None is not iterable)

Fixes: bug #1182075
Change-Id: Ia5f5fe78669bbaed599b7dd5cae1beb69bde7796
This commit is contained in:
Alessio Ababilov 2013-05-20 16:33:58 +03:00
parent 315a9a0907
commit decee66cb4

View File

@ -47,6 +47,7 @@ class VolumeTableMixIn(object):
except:
exceptions.handle(self.request,
_('Unable to retrieve volume list.'))
return []
def _get_instances(self):
try:
@ -56,6 +57,7 @@ class VolumeTableMixIn(object):
exceptions.handle(self.request,
_("Unable to retrieve volume/instance "
"attachment information"))
return []
def _set_id_if_nameless(self, volumes, instances):
for volume in volumes: