Replace oslo_utils.encodeutils.exception_to_unicode
The function is being deprecated now because it is equivalent to str(ex) in Python 3. Depends-on: https://review.opendev.org/c/openstack/oslo.utils/+/938929 Change-Id: I7c9ca3730e1ab6ffdaf8cb78c002ac4e157fe2f1
This commit is contained in:
@@ -408,7 +408,7 @@ class Controller(object):
|
||||
try:
|
||||
setattr(image, key, value)
|
||||
except warlock.InvalidOperation as e:
|
||||
raise TypeError(encodeutils.exception_to_unicode(e))
|
||||
raise TypeError(str(e))
|
||||
|
||||
resp, body = self.http_client.post(url, headers=headers, data=image)
|
||||
# NOTE(esheffield): remove 'self' for now until we have an elegant
|
||||
@@ -443,7 +443,7 @@ class Controller(object):
|
||||
try:
|
||||
setattr(image, key, value)
|
||||
except warlock.InvalidOperation as e:
|
||||
raise TypeError(encodeutils.exception_to_unicode(e))
|
||||
raise TypeError(str(e))
|
||||
|
||||
if remove_props:
|
||||
cur_props = image.keys()
|
||||
|
||||
Reference in New Issue
Block a user