diff options
| author | William Wolf <throughnothing@gmail.com> | 2011-05-20 11:42:38 -0400 |
|---|---|---|
| committer | William Wolf <throughnothing@gmail.com> | 2011-05-20 11:42:38 -0400 |
| commit | 0f191404fee42b9225f364af12242812798ff08a (patch) | |
| tree | 66ad9229f4116cfa5bd351b9c428f66007d16c4d /nova/api | |
| parent | e16b2d22dc4e6e24c3bf5150a0830661933aad29 (diff) | |
fixed silly issue with variable needing to be named 'id' for the url mapper, also caught new exception type where needed
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/images.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nova/api/openstack/images.py b/nova/api/openstack/images.py index ac02d63c5..2a3f9e070 100644 --- a/nova/api/openstack/images.py +++ b/nova/api/openstack/images.py @@ -74,7 +74,7 @@ class Controller(common.OpenstackController): builder = self.get_builder(req).build return dict(images=[builder(image, detail=True) for image in images]) - def show(self, req, image_id): + def show(self, req, id): """Return detailed information about a specific image. :param req: `wsgi.Request` object @@ -84,11 +84,14 @@ class Controller(common.OpenstackController): try: (image_service, service_image_id) = utils.get_image_service( - image_id) + id) image = image_service.show(context, service_image_id) except exception.NotFound: explanation = _("Image not found.") raise faults.Fault(webob.exc.HTTPNotFound(explanation=explanation)) + except exception.InvalidImageRef: + explanation = _("Image not found.") + raise faults.Fault(webob.exc.HTTPNotFound(explanation=explanation)) return dict(image=self.get_builder(req).build(image, detail=True)) |
