From 146ca0db8ca621c246f13ffa7b0567ac05c90eaa Mon Sep 17 00:00:00 2001 From: daisy-ycguo Date: Mon, 19 Nov 2012 14:07:16 +0800 Subject: [PATCH] Wrap log messages with _() bug 1075082 There are a few log messages without _(), but a lot messages with _(). Wrap these log messages with _() in order to make the code consistent. Change-Id: Ibaff2c352df925f7e00d5a62d111ef73f60c944b --- nova/notifications.py | 2 +- nova/openstack/common/rpc/amqp.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nova/notifications.py b/nova/notifications.py index b1338c582..9f92e3dd4 100644 --- a/nova/notifications.py +++ b/nova/notifications.py @@ -226,7 +226,7 @@ def bandwidth_usage(instance_ref, audit_start, nw_info = network.API().get_instance_nw_info(admin_context, instance_ref) except Exception: - LOG.exception('Failed to get nw_info', instance=instance_ref) + LOG.exception(_('Failed to get nw_info'), instance=instance_ref) if ignore_missing_network_data: return raise diff --git a/nova/openstack/common/rpc/amqp.py b/nova/openstack/common/rpc/amqp.py index a88408437..3324e3758 100644 --- a/nova/openstack/common/rpc/amqp.py +++ b/nova/openstack/common/rpc/amqp.py @@ -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 as e: - LOG.exception('Exception during message handling') + LOG.exception(_('Exception during message handling')) ctxt.reply(None, sys.exc_info(), connection_pool=self.connection_pool)