Don't translate exception messages

This commit is contained in:
Mark McLoughlin 2013-06-16 11:55:47 +01:00
parent 563383b51d
commit d821999629
3 changed files with 6 additions and 9 deletions

View File

@ -15,7 +15,6 @@
import abc
import sys
from oslo.messaging.openstack.common.gettextutils import _
from oslo.messaging.openstack.common import log as logging
_LOG = logging.getLogger(__name__)
@ -38,7 +37,7 @@ class ExecutorBase(object):
except Exception:
# sys.exc_info() is deleted by LOG.exception().
exc_info = sys.exc_info()
_LOG.error(_("Failed to process message... skipping it."),
_LOG.error("Failed to process message... skipping it.",
exc_info=exc_info)
incoming.reply(failure=exc_info)
finally:

View File

@ -17,7 +17,6 @@
from oslo import messaging
from oslo.messaging.notify import notifier
from oslo.messaging.openstack.common.gettextutils import _
from oslo.messaging.openstack.common import log as logging
LOG = logging.getLogger(__name__)
@ -36,8 +35,8 @@ class MessagingDriver(notifier._Driver):
self.transport._send(target, context, message,
envelope=self.envelope)
except Exception:
LOG.exception(_("Could not send notification to %(topic)s. "
"Payload=%(message)s"),
LOG.exception("Could not send notification to %(topic)s. "
"Payload=%(message)s",
dict(topic=topic, message=message))

View File

@ -21,7 +21,6 @@ from oslo.config import cfg
from stevedore import named
from oslo import messaging
from oslo.messaging.openstack.common.gettextutils import _
from oslo.messaging.openstack.common import log as logging
from oslo.messaging.openstack.common import timeutils
from oslo.messaging.openstack.common import uuidutils
@ -93,9 +92,9 @@ class Notifier(object):
try:
ext.obj.notify(context, msg, priority)
except Exception as e:
LOG.exception(_("Problem '%(e)s' attempting to send to "
"notification system. Payload=%(payload)s")
% dict(e=e, payload=payload))
LOG.exception("Problem '%(e)s' attempting to send to "
"notification system. Payload=%(payload)s",
dict(e=e, payload=payload))
self._driver_mgr.map(do_notify)
def debug(self, context, event_type, payload):