Replace exception_to_str with oslo.utils function
The oslo.utils function has exception_to_unicode that can replace glance util function exception_to_str. So we don't to have this exception_to_str function in glance anymore. Change-Id: I332bc55558087920fdd6ae2d822bece5166f5ba6
This commit is contained in:
@@ -230,7 +230,7 @@ class Controller(object):
|
||||
try:
|
||||
setattr(image, key, value)
|
||||
except warlock.InvalidOperation as e:
|
||||
raise TypeError(utils.exception_to_str(e))
|
||||
raise TypeError(encodeutils.exception_to_unicode(e))
|
||||
|
||||
resp, body = self.http_client.post(url, data=image)
|
||||
# NOTE(esheffield): remove 'self' for now until we have an elegant
|
||||
@@ -250,7 +250,7 @@ class Controller(object):
|
||||
try:
|
||||
setattr(image, key, value)
|
||||
except warlock.InvalidOperation as e:
|
||||
raise TypeError(utils.exception_to_str(e))
|
||||
raise TypeError(encodeutils.exception_to_unicode(e))
|
||||
|
||||
if remove_props:
|
||||
cur_props = image.keys()
|
||||
|
||||
Reference in New Issue
Block a user