diff --git a/tripleo_common/exception.py b/tripleo_common/exception.py index e4a69e615..b608d5401 100644 --- a/tripleo_common/exception.py +++ b/tripleo_common/exception.py @@ -21,7 +21,6 @@ import six from six import reraise as raise_ from tripleo_common.i18n import _ -from tripleo_common.i18n import _LE _FATAL_EXCEPTION_FORMAT_ERRORS = False @@ -47,9 +46,9 @@ class TripleoCommonException(Exception): exc_info = sys.exc_info() # kwargs doesn't match a variable in the message # log the issue and the kwargs - LOG.exception(_LE('Exception in string format operation')) + LOG.exception('Exception in string format operation') for name, value in kwargs.items(): - LOG.error(_LE("%(name)s: %(value)s"), + LOG.error("%(name)s: %(value)s", {'name': name, 'value': value}) # noqa if _FATAL_EXCEPTION_FORMAT_ERRORS: diff --git a/tripleo_common/i18n.py b/tripleo_common/i18n.py index 79243d49f..52a538a6d 100644 --- a/tripleo_common/i18n.py +++ b/tripleo_common/i18n.py @@ -23,13 +23,3 @@ _translators = i18n.TranslatorFactory(domain='tripleo') # The primary translation function using the well-known name "_" _ = _translators.primary - -# Translators for log levels. -# -# The abbreviated names are meant to reflect the usual use of a short -# name like '_'. The "L" is for "log" and the other letter comes from -# the level. -_LI = _translators.log_info -_LW = _translators.log_warning -_LE = _translators.log_error -_LC = _translators.log_critical