summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--nova/image/glance.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/nova/image/glance.py b/nova/image/glance.py
index ce6fd530f..9a93df2ab 100644
--- a/nova/image/glance.py
+++ b/nova/image/glance.py
@@ -275,12 +275,15 @@ class GlanceImageService(object):
:raises: ImageNotFound if the image does not exist.
:raises: NotAuthorized if the user is not an owner.
+ :raises: ImageNotAuthorized if the user is not authorized.
"""
try:
self._client.call(context, 1, 'delete', image_id)
except glanceclient.exc.NotFound:
raise exception.ImageNotFound(image_id=image_id)
+ except glanceclient.exc.HTTPForbidden:
+ raise exception.ImageNotAuthorized(image_id=image_id)
return True
@staticmethod