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.
This commit is contained in:
Danny Hermes
2016-08-11 11:16:18 -07:00
committed by Jon Wayne Parrott
parent 6a12a1fb58
commit f439dcbef4

View File

@@ -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: