Merge "Add more debug info for token_client request"

This commit is contained in:
Jenkins
2015-10-09 08:29:28 +00:00
committed by Gerrit Code Review
2 changed files with 4 additions and 2 deletions

View File

@@ -84,7 +84,8 @@ class TokenClient(rest_client.RestClient):
resp, resp_body = self.raw_request(url, method,
headers=headers, body=body)
self._log_request(method, url, resp)
self._log_request(method, url, resp, req_headers=headers,
req_body='<omitted>', resp_body=resp_body)
if resp.status in [401, 403]:
resp_body = json.loads(resp_body)

View File

@@ -134,7 +134,8 @@ class V3TokenClient(rest_client.RestClient):
resp, resp_body = self.raw_request(url, method,
headers=headers, body=body)
self._log_request(method, url, resp)
self._log_request(method, url, resp, req_headers=headers,
req_body='<omitted>', resp_body=resp_body)
if resp.status in [401, 403]:
resp_body = json.loads(resp_body)