diff options
Diffstat (limited to 'openstack/common/rpc/common.py')
| -rw-r--r-- | openstack/common/rpc/common.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/openstack/common/rpc/common.py b/openstack/common/rpc/common.py index 2bc7c61..d74425d 100644 --- a/openstack/common/rpc/common.py +++ b/openstack/common/rpc/common.py @@ -22,6 +22,7 @@ import sys import traceback from oslo.config import cfg +import six from openstack.common.gettextutils import _ from openstack.common import importutils @@ -299,7 +300,8 @@ def serialize_remote_exception(failure_info, log_failure=True): tb = traceback.format_exception(*failure_info) failure = failure_info[1] if log_failure: - LOG.error(_("Returning exception %s to caller"), unicode(failure)) + LOG.error(_("Returning exception %s to caller"), + six.text_type(failure)) LOG.error(tb) kwargs = {} @@ -309,7 +311,7 @@ def serialize_remote_exception(failure_info, log_failure=True): data = { 'class': str(failure.__class__.__name__), 'module': str(failure.__class__.__module__), - 'message': unicode(failure), + 'message': six.text_type(failure), 'tb': tb, 'args': failure.args, 'kwargs': kwargs |
