Skip to content

Commit

Permalink
Fix exception type in _get_minram_mindisk_params
Browse files Browse the repository at this point in the history
This fixes bug #968066

Change-Id: I5bdb8602fe1d808f9af72252670b40b67b8d41c9
  • Loading branch information
Julien Danjou authored and vishvananda committed Mar 31, 2012
1 parent ada63db commit aa3bb13
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nova/compute/api.py
Expand Up @@ -1223,7 +1223,7 @@ def _get_minram_mindisk_params(self, context, instance):
#try to get source image of the instance
orig_image = self.image_service.show(context,
instance['image_ref'])
except webob.exc.HTTPNotFound:
except exception.ImageNotFound:
return None, None

#disk format of vhd is non-shrinkable
Expand Down
2 changes: 1 addition & 1 deletion nova/tests/test_compute.py
Expand Up @@ -2268,7 +2268,7 @@ def test_snapshot_minram_mindisk_no_image(self):
"""

def fake_show(*args):
raise webob.exc.HTTPNotFound()
raise exception.ImageNotFound

self.stubs.Set(fake_image._FakeImageService, 'show', fake_show)

Expand Down

0 comments on commit aa3bb13

Please sign in to comment.