diff --git a/pankoclient/common/http.py b/pankoclient/common/http.py index 826edeb..3783de1 100644 --- a/pankoclient/common/http.py +++ b/pankoclient/common/http.py @@ -29,7 +29,6 @@ from six.moves.urllib import parse from pankoclient.common import exceptions as exc from pankoclient.common.i18n import _ -from pankoclient.common.i18n import _LW from pankoclient.common import utils LOG = logging.getLogger(__name__) @@ -55,7 +54,7 @@ def get_system_ca_file(): if os.path.exists(ca): LOG.debug("Using ca file %s", ca) return ca - LOG.warning(_LW("System ca file could not be found.")) + LOG.warning("System ca file could not be found.") class HTTPClient(object): diff --git a/pankoclient/common/i18n.py b/pankoclient/common/i18n.py index 582d056..83cb436 100644 --- a/pankoclient/common/i18n.py +++ b/pankoclient/common/i18n.py @@ -19,13 +19,3 @@ _translators = oslo_i18n.TranslatorFactory(domain='pankoclient') # 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 diff --git a/pankoclient/common/utils.py b/pankoclient/common/utils.py index 055b068..c5fae55 100644 --- a/pankoclient/common/utils.py +++ b/pankoclient/common/utils.py @@ -16,8 +16,6 @@ from six.moves.urllib import parse as urllib_parse import logging -from pankoclient.common.i18n import _LE - LOG = logging.getLogger(__name__) @@ -28,12 +26,12 @@ def get_response_body(resp): try: body = resp.json() except ValueError: - LOG.error(_LE('Could not decode response body as JSON')) + LOG.error('Could not decode response body as JSON') elif 'application/octet-stream' in content_type: try: body = resp.body() except ValueError: - LOG.error(_LE('Could not decode response body as raw')) + LOG.error('Could not decode response body as raw') else: body = None return body