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

Unified Diff: download_from_google_storage.py

Issue 23484061: Print gsutil error message when we enconter as 403 or 404 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 7 years, 3 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 38517efeb123f6a7d5d353b22b5a7c8e7d5f1710..b3987904989a7b80d4a20e55b16873e4d91676de 100755
--- a/download_from_google_storage.py
+++ b/download_from_google_storage.py
@@ -86,13 +86,13 @@ def check_bucket_permissions(bucket, gsutil):
base_url = 'gs://%s' % bucket
code, _, ls_err = gsutil.check_call('ls', base_url)
+ if code != 0:
+ print >> sys.stderr, ls_err
Isaac (away) 2013/09/19 17:57:59 Optional nit: consider wrapping this so it's clear
Ryan Tseng 2013/09/19 18:05:51 Yeah I think gsutil already does a pretty good job
if code == 403:
print >> sys.stderr, 'Got error 403 while authenticating to %s.' % base_url
print >> sys.stderr, 'Try running "download_from_google_storage --config".'
elif code == 404:
print >> sys.stderr, '%s not found.' % base_url
- elif code != 0:
- print >> sys.stderr, ls_err
return (base_url, code)
« 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