From 6d102bcf0cbacb1d37eec20c4d318e14724a056d Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Wed, 28 Nov 2012 23:33:01 -0500 Subject: Provide i18n to those messages without _() bug 1081498 There are a few log messages without _(), but a lot messages with _(). Wrap these log messages with _() in order to make the code consistent. fix missing imports for _ Pass the log message and interpolation argument(s) to the logger separately remove extra parens rework the patch against latest trunk Change-Id: Ib0a7b0f9c57aadfbc2cfc477c6123b885c9c6060 --- openstack/common/rpc/amqp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'openstack/common/rpc') diff --git a/openstack/common/rpc/amqp.py b/openstack/common/rpc/amqp.py index 2ea506a..b247106 100644 --- a/openstack/common/rpc/amqp.py +++ b/openstack/common/rpc/amqp.py @@ -55,7 +55,7 @@ class Pool(pools.Pool): # TODO(comstud): Timeout connections not used in a while def create(self): - LOG.debug('Pool creating new connection') + LOG.debug(_('Pool creating new connection')) return self.connection_cls(self.conf) def empty(self): @@ -283,7 +283,7 @@ class ProxyCallback(object): # This final None tells multicall that it is done. ctxt.reply(ending=True, connection_pool=self.connection_pool) except Exception: - LOG.exception('Exception during message handling') + LOG.exception(_('Exception during message handling')) ctxt.reply(None, sys.exc_info(), connection_pool=self.connection_pool) -- cgit