summaryrefslogtreecommitdiff
path: root/nova/image/glance.py
diff options
context:
space:
mode:
Diffstat (limited to 'nova/image/glance.py')
-rw-r--r--nova/image/glance.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/nova/image/glance.py b/nova/image/glance.py
index d40943fd24..d58128c9d6 100644
--- a/nova/image/glance.py
+++ b/nova/image/glance.py
@@ -612,18 +612,18 @@ def _translate_image_exception(image_id, exc_value):
if isinstance(exc_value, glanceclient.exc.NotFound):
return exception.ImageNotFound(image_id=image_id)
if isinstance(exc_value, glanceclient.exc.BadRequest):
- return exception.Invalid(unicode(exc_value))
+ return exception.Invalid(six.text_type(exc_value))
return exc_value
def _translate_plain_exception(exc_value):
if isinstance(exc_value, (glanceclient.exc.Forbidden,
glanceclient.exc.Unauthorized)):
- return exception.Forbidden(unicode(exc_value))
+ return exception.Forbidden(six.text_type(exc_value))
if isinstance(exc_value, glanceclient.exc.NotFound):
- return exception.NotFound(unicode(exc_value))
+ return exception.NotFound(six.text_type(exc_value))
if isinstance(exc_value, glanceclient.exc.BadRequest):
- return exception.Invalid(unicode(exc_value))
+ return exception.Invalid(six.text_type(exc_value))
return exc_value