Chromium Code Reviews

Unified Diff: download_from_google_storage.py

Issue 76583002: Add no_auth flag to skip auth checking for buckets that don't require it. Also fix tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: download_from_google_storage.py
diff --git a/download_from_google_storage.py b/download_from_google_storage.py
index bbb9e64f3b08865eac683a374e5a2006be7a636e..99636089505687677cd8097cd6a17f6a76fd1e43 100755
--- a/download_from_google_storage.py
+++ b/download_from_google_storage.py
@@ -297,7 +297,10 @@ def main(args):
help='Alias for "gsutil config". Run this if you want '
'to initialize your saved Google Storage '
'credentials.')
- parser.add_option('-p', '--platform',
+ parser.add_option('-n', '--no_auth', action='store_true',
+ help='Skip auth checking. Use if its known that the '
ghost stip (do not use) 2013/11/19 19:32:37 it's
+ 'target bucket is a public bucket.')
+ parser.add_option('-p', '--platform',
help='A regular expression that is compared against '
'Python\'s sys.platform. If this option is specified, '
'the download will happen only if there is a match.')
@@ -365,7 +368,8 @@ def main(args):
% options.output)
# Check we have a valid bucket with valid permissions.
- base_url, code = check_bucket_permissions(options.bucket, gsutil)
+ if not options.no_auth:
+ base_url, code = check_bucket_permissions(options.bucket, gsutil)
if code:
return code
« no previous file with comments | « no previous file | tests/download_from_google_storage_unittests.py » ('j') | tests/download_from_google_storage_unittests.py » ('J')

Powered by Google App Engine