Cleanup of samples including adding flags to control logging.
diff --git a/oauth2client/client.py b/oauth2client/client.py
index 69724f3..1a3937b 100644
--- a/oauth2client/client.py
+++ b/oauth2client/client.py
@@ -192,6 +192,7 @@
'user-agent': self.user_agent,
'content-type': 'application/x-www-form-urlencoded'
}
+ logging.info("Refresing access_token")
resp, content = http_request(
self.token_uri, method='POST', body=body, headers=headers)
if resp.status == 200:
@@ -218,6 +219,8 @@
self._invalid = True
if self.store is not None:
self.store(self)
+ else:
+ logging.warning("Unable to store refreshed credentials, no Storage provided.")
except:
pass
raise AccessTokenRefreshError(error_msg)