summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2012-12-18 21:09:30 +0000
committerGerrit Code Review <review@openstack.org>2012-12-18 21:09:30 +0000
commit32cdc0139412eb741c6cd36950eab1d643aa263a (patch)
tree3b619cdfb04febfd1cc379a9eeb19b9a1fe2f2b9
parent6e832c791c348079f0abeb207c305f16b7c83bbf (diff)
parentd774b3a2fb80f73cb2508a5273645589950c4975 (diff)
downloadnova-32cdc0139412eb741c6cd36950eab1d643aa263a.tar.gz
nova-32cdc0139412eb741c6cd36950eab1d643aa263a.tar.xz
nova-32cdc0139412eb741c6cd36950eab1d643aa263a.zip
Merge "Traceback when user doesn't have permission."
-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