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

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

Issue 954753002: [Telemetry] Add PRESUBMIT check to prevent .sha file uploaded without archive file uploaded (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix redundant BUCKET_ALIASES assignment Created 5 years, 10 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 | « tools/perf/PRESUBMIT.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 0e1ddc3f44ef8991eb36ea2820038fac7243d4b1..ed97ccbb4837bcbab573b4fab844fc0898e9c1f1 100644
--- a/tools/telemetry/telemetry/util/cloud_storage.py
+++ b/tools/telemetry/telemetry/util/cloud_storage.py
@@ -5,6 +5,7 @@
"""Wrappers for gsutil, for basic interaction with Google Cloud Storage."""
import contextlib
+import collections
import cStringIO
import hashlib
import logging
@@ -23,11 +24,13 @@ PARTNER_BUCKET = 'chrome-partner-telemetry'
INTERNAL_BUCKET = 'chrome-telemetry'
-BUCKET_ALIASES = {
- 'public': PUBLIC_BUCKET,
- 'partner': PARTNER_BUCKET,
- 'internal': INTERNAL_BUCKET,
-}
+# Uses ordered dict to make sure that bucket's key-value items are ordered from
+# the most open to the most restrictive.
+BUCKET_ALIASES = collections.OrderedDict((
+ ('public', PUBLIC_BUCKET),
+ ('partner', PARTNER_BUCKET),
+ ('internal', INTERNAL_BUCKET),
+))
_GSUTIL_URL = 'http://storage.googleapis.com/pub/gsutil.tar.gz'
« no previous file with comments | « tools/perf/PRESUBMIT.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698