Commit 8b3cad72 authored by hinoka@google.com's avatar hinoka@google.com

Print gsutil error message when we enconter as 403 or 404

We appear to be getting 403's when encountering errors other than mismatched
credentials.  The error message was originally hidden to avoid clutter, but it
has become obvious that there are other transient errors hidden behind a 403.

This change prints the original gsutil error message regardless of whether or not
we enconter a 403 or 404.


BUG=

Review URL: https://chromiumcodereview.appspot.com/23484061

git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@224195 0039d316-1c4b-4281-b951-d872f2087c98
parent 31b42c01
......@@ -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
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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment