diff options
| author | Alex Meade <alex.meade@rackspace.com> | 2011-06-30 09:28:21 -0400 |
|---|---|---|
| committer | Alex Meade <alex.meade@rackspace.com> | 2011-06-30 09:28:21 -0400 |
| commit | c12861f6068ea18156ff9c395ed40791585032d7 (patch) | |
| tree | 232a99859059745cd0ea0ca910c310ba61f9f945 /nova/api | |
| parent | d75e776815f2fc7710ba9d937985787b49a9947f (diff) | |
refactored instance type code
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/flavors.py | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/nova/api/openstack/flavors.py b/nova/api/openstack/flavors.py index be295b372..a21ff6cb2 100644 --- a/nova/api/openstack/flavors.py +++ b/nova/api/openstack/flavors.py @@ -42,10 +42,7 @@ class Controller(object): def _get_flavors(self, req, is_detail=True): """Helper function that returns a list of flavor dicts.""" ctxt = req.environ['nova.context'] - try: - flavors = db.api.instance_type_get_all(ctxt) - except exception.NoInstanceTypesFound: - flavors = {} + flavors = db.api.instance_type_get_all(ctxt) builder = self._get_view_builder(req) items = [builder.build(flavor, is_detail=is_detail) for flavor in flavors.values()] |
