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:
Takashi Kajinami
2025-02-03 20:47:55 +09:00
parent 235814cf86
commit b78fdc33be
4 changed files with 13 additions and 13 deletions
+2 -2
View File
@@ -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()