From 22277e6d0b92e5674e2602610dc30f9a9262caf8 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Mon, 12 May 2014 19:09:50 +0200 Subject: [PATCH] debug level logs should not be translated According to the OpenStack translation policy available at https://wiki.openstack.org/wiki/LoggingStandards debug messages should not be translated. Like mentioned in several changes in Nova by garyk this is to help prioritize log translation. Change-Id: I43c5d4ecd2286f1a622b6822603ba62881a317a2 --- novaclient/auth_plugin.py | 3 +-- novaclient/client.py | 10 +++++----- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/novaclient/auth_plugin.py b/novaclient/auth_plugin.py index 1c7227fdc..da2c07b26 100644 --- a/novaclient/auth_plugin.py +++ b/novaclient/auth_plugin.py @@ -20,7 +20,6 @@ import pkg_resources import six from novaclient import exceptions -from novaclient.openstack.common.gettextutils import _ from novaclient import utils @@ -40,7 +39,7 @@ def discover_auth_systems(): try: auth_plugin = ep.load() except (ImportError, pkg_resources.UnknownExtra, AttributeError) as e: - logger.debug(_("ERROR: Cannot load auth plugin %s") % ep.name) + logger.debug("ERROR: Cannot load auth plugin %s" % ep.name) logger.debug(e, exc_info=1) else: _discovered_plugins[ep.name] = auth_plugin diff --git a/novaclient/client.py b/novaclient/client.py index 6c1ad13e7..8ac0354b5 100644 --- a/novaclient/client.py +++ b/novaclient/client.py @@ -183,10 +183,10 @@ class HTTPClient(object): def http_log_resp(self, resp): if not self.http_log_debug: return - self._logger.debug(_("RESP: [%(status)s] %(headers)s\nRESP BODY: " - "%(text)s\n"), {'status': resp.status_code, - 'headers': resp.headers, - 'text': resp.text}) + self._logger.debug("RESP: [%(status)s] %(headers)s\nRESP BODY: " + "%(text)s\n", {'status': resp.status_code, + 'headers': resp.headers, + 'text': resp.text}) def open_session(self): if not self._connection_pool: @@ -375,7 +375,7 @@ class HTTPClient(object): # GET ...:5001/v2.0/tokens/#####/endpoints url = '/'.join([url, 'tokens', '%s?belongsTo=%s' % (self.proxy_token, self.proxy_tenant_id)]) - self._logger.debug(_("Using Endpoint URL: %s") % url) + self._logger.debug("Using Endpoint URL: %s" % url) resp, body = self._time_request( url, "GET", headers={'X-Auth-Token': self.auth_token}) return self._extract_service_catalog(url, resp, body,