diff options
| author | Jenkins <jenkins@review.openstack.org> | 2013-03-11 17:33:55 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2013-03-11 17:33:55 +0000 |
| commit | fb18fb32c05a8fc082653423331af1cd78db2b43 (patch) | |
| tree | ab1cab8a64672e147fc5d774e3d12a0e1c4b3688 /nova/api | |
| parent | 51b325ca38769684b73b3ec161e471ccad610fc5 (diff) | |
| parent | ccabf7a4dfff068bc5b37e769b7fb9d1b21cbf72 (diff) | |
| download | nova-fb18fb32c05a8fc082653423331af1cd78db2b43.tar.gz nova-fb18fb32c05a8fc082653423331af1cd78db2b43.tar.xz nova-fb18fb32c05a8fc082653423331af1cd78db2b43.zip | |
Merge "delete deleted image 500 bug"
Diffstat (limited to 'nova/api')
| -rw-r--r-- | nova/api/openstack/compute/images.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/nova/api/openstack/compute/images.py b/nova/api/openstack/compute/images.py index 82db21c9e..3d54da0b5 100644 --- a/nova/api/openstack/compute/images.py +++ b/nova/api/openstack/compute/images.py @@ -159,6 +159,11 @@ class Controller(wsgi.Controller): except exception.ImageNotFound: explanation = _("Image not found.") raise webob.exc.HTTPNotFound(explanation=explanation) + except exception.ImageNotAuthorized: + # The image service raises this exception on delete if glanceclient + # raises HTTPForbidden. + explanation = _("You are not allowed to delete the image.") + raise webob.exc.HTTPForbidden(explanation=explanation) return webob.exc.HTTPNoContent() @wsgi.serializers(xml=MinimalImagesTemplate) |
