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

Unified Diff: tools/buildbot_globals.py

Issue 317823003: Fix submit_try (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 6 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 | « no previous file | tools/retrieve_from_googlesource.py » ('j') | tools/retrieve_from_googlesource.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/buildbot_globals.py
diff --git a/tools/buildbot_globals.py b/tools/buildbot_globals.py
index 1dd781906189f566ff8c53f9a147e0369963717b..74fbb40360e0e94162eb99c81a036be068d75fb5 100755
--- a/tools/buildbot_globals.py
+++ b/tools/buildbot_globals.py
@@ -9,15 +9,12 @@ Provides read access to buildbot's global_variables.json .
"""
-from contextlib import closing
-
import HTMLParser
-import base64
import json
import re
+import retrieve_from_googlesource
import svn
import sys
-import urllib2
_global_vars = None
@@ -61,8 +58,8 @@ def Get(var_name):
global _global_vars
if not _global_vars:
try:
- with closing(urllib2.urlopen(_GLOBAL_VARS_JSON_BASE64_URL)) as f:
- global_vars_text = base64.b64decode(f.read())
+ retrieve_from_googlesource.retrieve_from_googlesource(
+ _GLOBAL_VARS_JSON_BASE64_URL)
except Exception as e:
raise GlobalVarsRetrievalError('Failed to retrieve %s:\n%s' %
(_GLOBAL_VARS_JSON_BASE64_URL, str(e)))
« no previous file with comments | « no previous file | tools/retrieve_from_googlesource.py » ('j') | tools/retrieve_from_googlesource.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698