Merge "String interpolation should be delayed"

This commit is contained in:
Jenkins
2017-07-24 15:27:35 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 6 deletions

View File

@@ -50,8 +50,8 @@ LOG = logging.getLogger(__name__)
def log_request(func):
def decorator(self, *args, **kwargs):
resp = func(self, *args, **kwargs)
LOG.debug("HTTP %s %s %d" % (resp.request.method, resp.url,
resp.status_code))
LOG.debug("HTTP %s %s %d", resp.request.method, resp.url,
resp.status_code)
return resp
return decorator

View File

@@ -145,10 +145,8 @@ class KeycloakAuthHandler(auth.AuthHandler):
except Exception as e:
raise Exception("Failed to get access token:\n %s" % str(e))
LOG.debug(
"HTTP response from OIDC provider: %s" %
pprint.pformat(resp.json())
)
LOG.debug("HTTP response from OIDC provider: %s",
pprint.pformat(resp.json()))
return resp.json()['access_token']