summaryrefslogtreecommitdiffstats
path: root/openstack/common/excutils.py
diff options
context:
space:
mode:
authorDavanum Srinivas <dims@linux.vnet.ibm.com>2012-11-28 23:33:01 -0500
committerDavanum Srinivas <dims@linux.vnet.ibm.com>2012-11-28 23:33:01 -0500
commit6d102bcf0cbacb1d37eec20c4d318e14724a056d (patch)
tree83a30dddc1af8825a9e071b3a43a05f0759848f4 /openstack/common/excutils.py
parentcf705c59615fb68cdbfe664e7827e4a275a4a282 (diff)
downloadoslo-6d102bcf0cbacb1d37eec20c4d318e14724a056d.tar.gz
oslo-6d102bcf0cbacb1d37eec20c4d318e14724a056d.tar.xz
oslo-6d102bcf0cbacb1d37eec20c4d318e14724a056d.zip
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
Diffstat (limited to 'openstack/common/excutils.py')
-rw-r--r--openstack/common/excutils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/openstack/common/excutils.py b/openstack/common/excutils.py
index 5dd4830..c518310 100644
--- a/openstack/common/excutils.py
+++ b/openstack/common/excutils.py
@@ -24,6 +24,8 @@ import logging
import sys
import traceback
+from openstack.common.gettextutils import _
+
@contextlib.contextmanager
def save_and_reraise_exception():
@@ -43,7 +45,7 @@ def save_and_reraise_exception():
try:
yield
except Exception:
- logging.error('Original exception being dropped: %s' %
- (traceback.format_exception(type_, value, tb)))
+ logging.error(_('Original exception being dropped: %s'),
+ traceback.format_exception(type_, value, tb))
raise
raise type_, value, tb