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/push-to-trunk/common_includes.py

Issue 77453009: Make auto-roll testable. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebase. Created 7 years, 1 month 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/push-to-trunk/auto_roll.py ('k') | tools/push-to-trunk/test_scripts.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/push-to-trunk/common_includes.py
diff --git a/tools/push-to-trunk/common_includes.py b/tools/push-to-trunk/common_includes.py
index b6f976144d70c0054806a136b0ca93a039568a85..6c0ad035107dbf0376971702a56b9e48b0fb3583 100644
--- a/tools/push-to-trunk/common_includes.py
+++ b/tools/push-to-trunk/common_includes.py
@@ -31,6 +31,7 @@ import re
import subprocess
import sys
import textwrap
+import urllib2
PERSISTFILE_BASENAME = "PERSISTFILE_BASENAME"
TEMP_BRANCH = "TEMP_BRANCH"
@@ -192,6 +193,14 @@ class SideEffectHandler(object):
def ReadLine(self):
return sys.stdin.readline().strip()
+ def ReadURL(self, url):
+ # pylint: disable=E1121
+ url_fh = urllib2.urlopen(url, None, 60)
+ try:
+ return url_fh.read()
+ finally:
+ url_fh.close()
+
DEFAULT_SIDE_EFFECT_HANDLER = SideEffectHandler()
@@ -251,6 +260,9 @@ class Step(object):
return self._side_effect_handler.Command(os.environ["EDITOR"], args,
pipe=False)
+ def ReadURL(self, url):
+ return self._side_effect_handler.ReadURL(url)
+
def Die(self, msg=""):
if msg != "":
print "Error: %s" % msg
« no previous file with comments | « tools/push-to-trunk/auto_roll.py ('k') | tools/push-to-trunk/test_scripts.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698