summaryrefslogtreecommitdiffstats
path: root/nova/image
diff options
context:
space:
mode:
authorAnthony Young <sleepsonthefloor@gmail.com>2012-03-26 14:50:17 -0700
committerAnthony Young <sleepsonthefloor@gmail.com>2012-03-26 14:52:33 -0700
commit42585a3b2559329f0e563bcd04ff6c8c19115439 (patch)
treef6946ac13e8873b236afe8a8f1566a9aac1bb686 /nova/image
parent81587ba245c0929944e1edaf79909b5070c9a92e (diff)
Handle Forbidden and NotAuthenticated glance exc.
* Remove references to deprecated NotAuthorized exception * Handle Forbidden and NotAuthenticated * Fixes bug 965540 Change-Id: Ib5eef3015239e0fafdb01c975a0f5d553f70519e
Diffstat (limited to 'nova/image')
-rw-r--r--nova/image/glance.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/nova/image/glance.py b/nova/image/glance.py
index 93e6cf273..a5f9e6865 100644
--- a/nova/image/glance.py
+++ b/nova/image/glance.py
@@ -485,7 +485,8 @@ def _reraise_translated_exception():
def _translate_image_exception(image_id, exc_type, exc_value):
- if exc_type in (glance_exception.NotAuthorized,
+ if exc_type in (glance_exception.Forbidden,
+ glance_exception.NotAuthenticated,
glance_exception.MissingCredentialError):
return exception.ImageNotAuthorized(image_id=image_id)
if exc_type is glance_exception.NotFound:
@@ -496,7 +497,8 @@ def _translate_image_exception(image_id, exc_type, exc_value):
def _translate_plain_exception(exc_type, exc_value):
- if exc_type in (glance_exception.NotAuthorized,
+ if exc_type in (glance_exception.Forbidden,
+ glance_exception.NotAuthenticated,
glance_exception.MissingCredentialError):
return exception.NotAuthorized(exc_value)
if exc_type is glance_exception.NotFound: