Merge "Replace deprecated BaseException.message with six.text_type"
This commit is contained in:
commit
cd881c7177
@ -17,6 +17,7 @@ import functools
|
|||||||
import gettext
|
import gettext
|
||||||
import inspect
|
import inspect
|
||||||
import platform
|
import platform
|
||||||
|
import six
|
||||||
|
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
from oslo_utils import timeutils
|
from oslo_utils import timeutils
|
||||||
@ -262,11 +263,7 @@ class IBMStorageProxy(object):
|
|||||||
return "Status: '%s', Code: %s" % (
|
return "Status: '%s', Code: %s" % (
|
||||||
exception.status, exception.code)
|
exception.status, exception.code)
|
||||||
|
|
||||||
try:
|
return six.text_type(exception)
|
||||||
msg = exception.message
|
|
||||||
except AttributeError:
|
|
||||||
msg = exception
|
|
||||||
return msg
|
|
||||||
|
|
||||||
def _get_driver_super(self):
|
def _get_driver_super(self):
|
||||||
"""Gets the IBM Storage Drivers super class
|
"""Gets the IBM Storage Drivers super class
|
||||||
|
Loading…
Reference in New Issue
Block a user