diff options
Diffstat (limited to 'python')
| -rw-r--r-- | python/download_emails.py | 1 | ||||
| -rw-r--r-- | python/send_email.py | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/python/download_emails.py b/python/download_emails.py index 8b383345..a0de7e6c 100644 --- a/python/download_emails.py +++ b/python/download_emails.py @@ -7,7 +7,6 @@ from apiclient import errors from httplib2 import Http import oauth2client from oauth2client import client -from oauth2client import tools import json import base64 import binascii diff --git a/python/send_email.py b/python/send_email.py index 3c2ae1a0..ee107768 100644 --- a/python/send_email.py +++ b/python/send_email.py @@ -11,7 +11,6 @@ from email.mime.text import MIMEText import sys import argparse -flags = argparse.ArgumentParser(parents=[tools.argparser]).parse_args() SCOPES = 'https://www.googleapis.com/auth/gmail.modify' CLIENT_SECRET_FILE = 'secret.json' @@ -35,6 +34,7 @@ def get_gmail_service(): store = oauth2client.file.Storage(credential_path) credentials = store.get() if not credentials or credentials.invalid: + flags = argparse.ArgumentParser(parents=[tools.argparser]).parse_args() flow = client.flow_from_clientsecrets(CLIENT_SECRET_FILE, SCOPES) flow.user_agent = APPLICATION_NAME credentials = tools.run_flow(flow, store, flags) |
