diff options
Diffstat (limited to 'python/send_email.py')
| -rw-r--r-- | python/send_email.py | 2 |
1 files changed, 1 insertions, 1 deletions
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) |
