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

Unified Diff: tools/telemetry/telemetry/util/cloud_storage.py

Issue 556003002: [telemetry] Use consistent bucket naming. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove code that says "remove this" Created 6 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
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
« tools/perf/page_sets/PRESUBMIT.py ('K') | « tools/telemetry/telemetry/page/page_set_archive_info.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698