From e52cd4f3420d6f3b437277e7bc9e75d5c0221290 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Thu, 29 Mar 2012 10:52:04 +0200 Subject: Fix exception type in _get_minram_mindisk_params This fixes bug #968066 Change-Id: I5bdb8602fe1d808f9af72252670b40b67b8d41c9 --- nova/compute/api.py | 2 +- nova/tests/test_compute.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nova/compute/api.py b/nova/compute/api.py index 37e136a41..fbbc14771 100644 --- a/nova/compute/api.py +++ b/nova/compute/api.py @@ -1237,7 +1237,7 @@ class API(base.Base): #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 diff --git a/nova/tests/test_compute.py b/nova/tests/test_compute.py index ecb980106..305282c14 100644 --- a/nova/tests/test_compute.py +++ b/nova/tests/test_compute.py @@ -2268,7 +2268,7 @@ class ComputeAPITestCase(BaseTestCase): """ def fake_show(*args): - raise webob.exc.HTTPNotFound() + raise exception.ImageNotFound self.stubs.Set(fake_image._FakeImageService, 'show', fake_show) -- cgit