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

Unified Diff: download_from_google_storage.py

Issue 844373002: Support optional BOTO specification with --no_auth. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: test PROXY vars instead Created 5 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: download_from_google_storage.py
diff --git a/download_from_google_storage.py b/download_from_google_storage.py
index 09be339d452bbaefbafd2055ecfe1458aa607e2d..0f53ea46e93be9297fb60fb3f99d39b7177f64d8 100755
--- a/download_from_google_storage.py
+++ b/download_from_google_storage.py
@@ -384,7 +384,18 @@ def main(args):
# Set the boto file to /dev/null if we don't need auth.
if options.no_auth:
- options.boto = os.devnull
+ if (set(('http_proxy', 'https_proxy')).intersection(
+ env.lower() for env in os.environ) and
+ 'NO_AUTH_BOTO_CONFIG' not in os.environ):
+ print >> sys.stderr, ('NOTICE: You have PROXY values set in your '
+ 'environment, but gsutil in depot_tools does not '
+ '(yet) obey them.')
+ print >> sys.stderr, ('Also, --no_auth prevents the normal BOTO_CONFIG '
+ 'environment variable from being used.')
+ print >> sys.stderr, ('To use a proxy in this situation, please supply '
+ 'those settings in a .boto file pointed to by '
+ 'the NO_AUTH_BOTO_CONFIG environment var.')
+ options.boto = os.environ.get('NO_AUTH_BOTO_CONFIG', os.devnull)
# Make sure gsutil exists where we expect it to.
if os.path.exists(GSUTIL_DEFAULT_PATH):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698