Skip to content

Commit

Permalink
Gmail oauth flow shouldn't attempt to parse the command line.
Browse files Browse the repository at this point in the history
If any command line arguments are passed to bugwarrior, gmail will try
to parse them and fail. It's not possible pass arguments to Oauth this
way anyway (because bugwarrior would reject the unrecognised command
line arguments), so we shouldn't try to do it. (I see no reason to pass
flags to OAuth here, if needed we'd have to find another way.)
  • Loading branch information
cthulahoops authored and ryneeverett committed Jun 21, 2017
1 parent ddc60f6 commit 51eaa40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bugwarrior/services/gmail.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def get_credentials(self):
log.info("No valid login. Starting OAUTH flow.")
flow = oauth2client.client.flow_from_clientsecrets(self.client_secret_path, self.SCOPES)
flow.user_agent = self.APPLICATION_NAME
flags = oauth2client.tools.argparser.parse_args()
flags = oauth2client.tools.argparser.parse_args([])
credentials = oauth2client.tools.run_flow(flow, store, flags)
log.info('Storing credentials to %r', self.credentials_path)
return credentials
Expand Down

0 comments on commit 51eaa40

Please sign in to comment.