Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: third_party/gsutil/oauth2_plugin/oauth2_helper.py

Issue 222973002: Remove prompt for default project ID (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Revert spaces Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/gsutil/gslib/commands/config.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/gsutil/oauth2_plugin/oauth2_helper.py
diff --git a/third_party/gsutil/oauth2_plugin/oauth2_helper.py b/third_party/gsutil/oauth2_plugin/oauth2_helper.py
index 9cf22d264af9baeff5fbc35ed2bf0b0a805d1c66..585b50403351ad785a902fa91bf54e0474f5e68a 100644
--- a/third_party/gsutil/oauth2_plugin/oauth2_helper.py
+++ b/third_party/gsutil/oauth2_plugin/oauth2_helper.py
@@ -86,21 +86,14 @@ def OAuth2ApprovalFlow(oauth2_client, scopes, launch_browser=False):
'callable [...] in [...] Popen.__del__" which can be ignored.]\n\n' % approval_url)
else:
sys.stdout.write(
- 'Please navigate your browser to the following URL:\n%s\n' %
+ 'Please navigate your browser to the following URL:\n%s\n\n' %
approval_url)
- sys.stdout.write(
- 'In your browser you should see a page that requests you to authorize '
- 'gsutil to access\nGoogle Cloud Storage on your behalf. After you '
- 'approve, an authorization code will be displayed.\n\n')
if (launch_browser and
not webbrowser.open(approval_url, new=1, autoraise=True)):
sys.stdout.write(
'Launching browser appears to have failed; please navigate a browser '
'to the following URL:\n%s\n' % approval_url)
- # Short delay; webbrowser.open on linux insists on printing out a message
- # which we don't want to run into the prompt for the auth code.
- time.sleep(2)
code = raw_input('Enter the authorization code: ')
refresh_token, access_token = oauth2_client.ExchangeAuthorizationCode(
« no previous file with comments | « third_party/gsutil/gslib/commands/config.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698