| Index: tools/telemetry/telemetry/util/cloud_storage.py
|
| diff --git a/tools/telemetry/telemetry/util/cloud_storage.py b/tools/telemetry/telemetry/util/cloud_storage.py
|
| index 0230b9acd98f9681ff2c812a4b7e5723d5d0f8ef..ab6978112510f5a2e0dceb6636d6c0f47fc1ed98 100644
|
| --- a/tools/telemetry/telemetry/util/cloud_storage.py
|
| +++ b/tools/telemetry/telemetry/util/cloud_storage.py
|
| @@ -17,6 +17,7 @@ import urllib2
|
| from telemetry.core.backends.chrome import cros_interface
|
| from telemetry.util import path
|
|
|
| +
|
| PUBLIC_BUCKET = 'chromium-telemetry'
|
| PARTNER_BUCKET = 'chrome-partner-telemetry'
|
| INTERNAL_BUCKET = 'chrome-telemetry'
|
| @@ -28,6 +29,7 @@ _DOWNLOAD_PATH = os.path.join(path.GetTelemetryDir(), 'third_party', 'gsutil')
|
| # http://crbug.com/359293. See |_RunCommand|.
|
| _CROS_GSUTIL_HOME_WAR = '/home/chromeos-test/'
|
|
|
| +
|
| class CloudStorageError(Exception):
|
| @staticmethod
|
| def _GetConfigInstructions(gsutil_path):
|
| @@ -127,6 +129,8 @@ def _RunCommand(args):
|
| 'You are attempting to access protected data with no configured',
|
| 'Failure: No handler was ready to authenticate.')):
|
| raise CredentialsError(gsutil_path)
|
| + if 'status=401' in stderr or 'status 401' in stderr:
|
| + raise CredentialsError(gsutil_path)
|
| if 'status=403' in stderr or 'status 403' in stderr:
|
| raise PermissionError(gsutil_path)
|
| if (stderr.startswith('InvalidUriError') or 'No such object' in stderr or
|
|
|