| 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 274c1dab9f05513591b22ccecd686130d5f8ff7b..ccad47fce92eda765b2b5211fb856f913d847848 100644
|
| --- a/tools/telemetry/telemetry/util/cloud_storage.py
|
| +++ b/tools/telemetry/telemetry/util/cloud_storage.py
|
| @@ -17,17 +17,26 @@ import urllib2
|
| from telemetry.core import platform
|
| from telemetry.util import path
|
|
|
| +
|
| PUBLIC_BUCKET = 'chromium-telemetry'
|
| PARTNER_BUCKET = 'chrome-partner-telemetry'
|
| INTERNAL_BUCKET = 'chrome-telemetry'
|
|
|
|
|
| +BUCKET_ALIASES = {
|
| + 'public': PUBLIC_BUCKET,
|
| + 'partner': PARTNER_BUCKET,
|
| + 'internal': INTERNAL_BUCKET,
|
| +}
|
| +
|
| +
|
| _GSUTIL_URL = 'http://storage.googleapis.com/pub/gsutil.tar.gz'
|
| _DOWNLOAD_PATH = os.path.join(path.GetTelemetryDir(), 'third_party', 'gsutil')
|
| # TODO(tbarzic): A workaround for http://crbug.com/386416 and
|
| # http://crbug.com/359293. See |_RunCommand|.
|
| _CROS_GSUTIL_HOME_WAR = '/home/chromeos-test/'
|
|
|
| +
|
| class CloudStorageError(Exception):
|
| @staticmethod
|
| def _GetConfigInstructions(gsutil_path):
|
| @@ -127,6 +136,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
|
|
|