diff --git a/nova/api/openstack/__init__.py b/nova/api/openstack/__init__.py index b2f57e7d22df..4438fb238b44 100644 --- a/nova/api/openstack/__init__.py +++ b/nova/api/openstack/__init__.py @@ -20,7 +20,6 @@ WSGI middleware for OpenStack API controllers. from oslo_log import log as logging import routes -import six import stevedore import webob.dec import webob.exc @@ -54,7 +53,7 @@ class FaultWrapper(base_wsgi.Middleware): status, webob.exc.HTTPInternalServerError)() def _error(self, inner, req): - LOG.exception(_LE("Caught error: %s"), six.text_type(inner)) + LOG.exception(_LE("Caught error: %s"), inner) safe = getattr(inner, 'safe', False) headers = getattr(inner, 'headers', None) diff --git a/nova/cmd/api.py b/nova/cmd/api.py index c127f0d22859..19e09407814d 100644 --- a/nova/cmd/api.py +++ b/nova/cmd/api.py @@ -24,7 +24,6 @@ import sys from oslo_log import log as logging from oslo_reports import guru_meditation_report as gmr -import six import nova.conf from nova import config @@ -63,7 +62,7 @@ def main(): except exception.PasteAppNotFound as ex: log.warning( _LW("%s. ``enabled_apis`` includes bad values. " - "Fix to remove this warning."), six.text_type(ex)) + "Fix to remove this warning."), ex) if started == 0: log.error(_LE('No APIs were started. ' diff --git a/nova/network/security_group/neutron_driver.py b/nova/network/security_group/neutron_driver.py index 21f2c76ceff0..91d5b9a598a5 100644 --- a/nova/network/security_group/neutron_driver.py +++ b/nova/network/security_group/neutron_driver.py @@ -243,7 +243,7 @@ class SecurityGroupAPI(security_group_base.SecurityGroupBase): "group %s"), name) self.raise_over_quota(six.text_type(e)) elif e.status_code == 400: - LOG.exception(_LE("Neutron Error: %s"), six.text_type(e)) + LOG.exception(_LE("Neutron Error: %s"), e) self.raise_invalid_property(six.text_type(e)) else: LOG.exception(_LE("Neutron Error:"))