From f439dcbef4137d3c5ee6ba1d92b90e7c0ff2d8f5 Mon Sep 17 00:00:00 2001 From: Danny Hermes Date: Thu, 11 Aug 2016 11:16:18 -0700 Subject: [PATCH] Change status access from header to attribute. (#616) This is to unify all the times a status is used from the response (containing header info) of an HTTP request. --- oauth2client/client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oauth2client/client.py b/oauth2client/client.py index e89468b..d92ec82 100644 --- a/oauth2client/client.py +++ b/oauth2client/client.py @@ -814,7 +814,7 @@ class OAuth2Credentials(Credentials): # An {'error':...} response body means the token is expired or # revoked, so we flag the credentials as such. logger.info('Failed to retrieve access token: %s', content) - error_msg = 'Invalid response {0}.'.format(resp['status']) + error_msg = 'Invalid response {0}.'.format(resp.status) try: d = json.loads(content) if 'error' in d: