From: Tony Mack Date: Fri, 22 Jun 2012 17:09:14 +0000 (-0400) Subject: fix potential TypeError X-Git-Tag: sfa-2.1-12~40 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=8e5f316b4475297c8ee39607346e7a2892bdbc28;p=sfa.git fix potential TypeError --- diff --git a/sfa/openstack/osaggregate.py b/sfa/openstack/osaggregate.py index 5d96c511..90fd003a 100644 --- a/sfa/openstack/osaggregate.py +++ b/sfa/openstack/osaggregate.py @@ -146,7 +146,9 @@ class OSAggregate: def get_aggregate_nodes(self): zones = self.get_availability_zones() # available sliver/instance/vm types - instances = self.driver.shell.db.instance_type_get_all().values() + instances = self.driver.shell.db.instance_type_get_all() + if isinstance(instances, dict): + instances = instances.values() # available images image_manager = ImageManager(self.driver) disk_images = image_manager.get_available_disk_images()