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

Unified Diff: download_from_google_storage.py

Issue 1182583003: Simply download_from_google_storage --config (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: keep os.devnull boto, don't use execv Created 5 years, 6 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 291643b1ee429099a1a27dd60731fb1f0c9a1914..a45f387ce2aeb3a2d9f8f820206ff8e597eb1e5c 100755
--- a/download_from_google_storage.py
+++ b/download_from_google_storage.py
@@ -54,7 +54,7 @@ def GetNormalizedPlatform():
class Gsutil(object):
"""Call gsutil with some predefined settings. This is a convenience object,
and is also immutable."""
- def __init__(self, path, boto_path, timeout=None, version='4.7'):
+ def __init__(self, path, boto_path=None, timeout=None, version='4.7'):
hinoka 2015/06/17 19:49:20 I think i'll deprecate boto_path as a flag at some
if not os.path.exists(path):
raise FileNotFoundError('GSUtil not found in %s' % path)
self.path = path
@@ -70,11 +70,6 @@ class Gsutil(object):
elif self.boto_path:
env['AWS_CREDENTIAL_FILE'] = self.boto_path
env['BOTO_CONFIG'] = self.boto_path
- else:
- custompath = env.get('AWS_CREDENTIAL_FILE', '~/.boto') + '.depot_tools'
- custompath = os.path.expanduser(custompath)
- if os.path.exists(custompath):
- env['AWS_CREDENTIAL_FILE'] = custompath
return env
@@ -403,8 +398,11 @@ def main(args):
# Passing in -g/--config will run our copy of GSUtil, then quit.
if options.config:
- return gsutil.call('config', '-r', '-o',
- os.path.expanduser('~/.boto.depot_tools'))
+ print '===Note from depot_tools==='
+ print 'If you do not have a project ID, enter "0" when asked for one.'
+ print '===End note from depot_tools==='
+ print
+ return gsutil.call('config')
if not args:
parser.error('Missing target.')
« 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