Don't translate exception messages
This commit is contained in:
parent
563383b51d
commit
d821999629
oslo/messaging
@ -15,7 +15,6 @@
|
|||||||
import abc
|
import abc
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
from oslo.messaging.openstack.common.gettextutils import _
|
|
||||||
from oslo.messaging.openstack.common import log as logging
|
from oslo.messaging.openstack.common import log as logging
|
||||||
|
|
||||||
_LOG = logging.getLogger(__name__)
|
_LOG = logging.getLogger(__name__)
|
||||||
@ -38,7 +37,7 @@ class ExecutorBase(object):
|
|||||||
except Exception:
|
except Exception:
|
||||||
# sys.exc_info() is deleted by LOG.exception().
|
# sys.exc_info() is deleted by LOG.exception().
|
||||||
exc_info = sys.exc_info()
|
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)
|
exc_info=exc_info)
|
||||||
incoming.reply(failure=exc_info)
|
incoming.reply(failure=exc_info)
|
||||||
finally:
|
finally:
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
|
|
||||||
from oslo import messaging
|
from oslo import messaging
|
||||||
from oslo.messaging.notify import notifier
|
from oslo.messaging.notify import notifier
|
||||||
from oslo.messaging.openstack.common.gettextutils import _
|
|
||||||
from oslo.messaging.openstack.common import log as logging
|
from oslo.messaging.openstack.common import log as logging
|
||||||
|
|
||||||
LOG = logging.getLogger(__name__)
|
LOG = logging.getLogger(__name__)
|
||||||
@ -36,8 +35,8 @@ class MessagingDriver(notifier._Driver):
|
|||||||
self.transport._send(target, context, message,
|
self.transport._send(target, context, message,
|
||||||
envelope=self.envelope)
|
envelope=self.envelope)
|
||||||
except Exception:
|
except Exception:
|
||||||
LOG.exception(_("Could not send notification to %(topic)s. "
|
LOG.exception("Could not send notification to %(topic)s. "
|
||||||
"Payload=%(message)s"),
|
"Payload=%(message)s",
|
||||||
dict(topic=topic, message=message))
|
dict(topic=topic, message=message))
|
||||||
|
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@ from oslo.config import cfg
|
|||||||
from stevedore import named
|
from stevedore import named
|
||||||
|
|
||||||
from oslo import messaging
|
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 log as logging
|
||||||
from oslo.messaging.openstack.common import timeutils
|
from oslo.messaging.openstack.common import timeutils
|
||||||
from oslo.messaging.openstack.common import uuidutils
|
from oslo.messaging.openstack.common import uuidutils
|
||||||
@ -93,9 +92,9 @@ class Notifier(object):
|
|||||||
try:
|
try:
|
||||||
ext.obj.notify(context, msg, priority)
|
ext.obj.notify(context, msg, priority)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
LOG.exception(_("Problem '%(e)s' attempting to send to "
|
LOG.exception("Problem '%(e)s' attempting to send to "
|
||||||
"notification system. Payload=%(payload)s")
|
"notification system. Payload=%(payload)s",
|
||||||
% dict(e=e, payload=payload))
|
dict(e=e, payload=payload))
|
||||||
self._driver_mgr.map(do_notify)
|
self._driver_mgr.map(do_notify)
|
||||||
|
|
||||||
def debug(self, context, event_type, payload):
|
def debug(self, context, event_type, payload):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user