diff --git a/gmailMessageCounter.py b/gmailMessageCounter.py index 1de5864..a7ced7a 100644 --- a/gmailMessageCounter.py +++ b/gmailMessageCounter.py @@ -5,7 +5,7 @@ from apiclient.discovery import build from oauth2client.client import flow_from_clientsecrets from oauth2client.file import Storage -from oauth2client.tools import run +from oauth2client import tools CLIENT_SECRET_FILE = 'client_secret_.apps.googleusercontent.com.json' STORAGE = Storage('gmail.storage') @@ -20,7 +20,7 @@ def build_service(): http = httplib2.Http() credentials = STORAGE.get() if credentials is None or credentials.invalid: - credentials = run(flow, STORAGE, http=http) + credentials = tools.run_flow(flow, STORAGE, http=http) http = credentials.authorize(http) return build('gmail', 'v1', http=http)