Index: download_from_google_storage.py |
diff --git a/download_from_google_storage.py b/download_from_google_storage.py |
index 09be339d452bbaefbafd2055ecfe1458aa607e2d..d56ad1d25e530e1d88b224189701a84023876843 100755 |
--- a/download_from_google_storage.py |
+++ b/download_from_google_storage.py |
@@ -384,7 +384,15 @@ 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 (os.environ.get('BOTO_CONFIG') and not |
+ os.environ.get('NO_AUTH_BOTO_CONFIG')): |
hinoka
2015/01/14 18:50:15
Lets only trigger this if proxy settings are detec
Michael Moss
2015/01/14 20:04:05
Everyone exports BOTO_CONFIG? The case I'm concern
|
+ print >> sys.stderr, ('NOTICE: You have BOTO_CONFIG set in your ' |
+ 'environment, but the "--no_auth" flag prevents ' |
+ 'it from being used.\n' |
hinoka
2015/01/14 18:50:15
Split this into two print statements. '\n' isn't t
Michael Moss
2015/01/14 21:05:44
Done.
|
+ 'If you need boto configs even when using ' |
+ '--no_auth (e.g. proxy settings), export your ' |
+ 'BOTO_CONFIG as NO_AUTH_BOTO_CONFIG instead.') |
hinoka
2015/01/14 18:50:15
s/instead/also/
Michael Moss
2015/01/14 21:05:44
Done.
|
+ 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): |