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..13dc0247d30e6e7ad2f018987fc7c4129d96c000 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 |
@@ -22,12 +23,12 @@ PUBLIC_BUCKET = 'chromium-telemetry' |
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() |
+BUCKET_ALIASES['public'] = PUBLIC_BUCKET |
+BUCKET_ALIASES['partner'] = PARTNER_BUCKET |
+BUCKET_ALIASES['internal'] = INTERNAL_BUCKET |
dtu
2015/02/24 19:39:49
collections.OrderedDict((
('public', PUBLIC_BUCK
slamm
2015/02/24 20:51:19
Also,
collections.OrderedDict(
public=PUBLIC_BU
nednguyen
2015/02/24 20:57:46
Cool. But I prefer Dave's syntax.
nednguyen
2015/02/24 20:57:46
Done.
|
_GSUTIL_URL = 'http://storage.googleapis.com/pub/gsutil.tar.gz' |