From 7f6af7a36c041110b070c6d81e9536c8c018b253 Mon Sep 17 00:00:00 2001 From: Oleh Prypin Date: Wed, 1 Nov 2017 21:59:32 +0100 Subject: [PATCH] Use urllib2 in roll_deps, which raises on non-200 HTTP status MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This ensures that on service outages we get a clear early error message instead of something cryptic later down the line Bug: None Change-Id: Ib637ed97144284e3744aaa948f594f5795fa9c72 No-Try: True Reviewed-on: https://webrtc-review.googlesource.com/18040 Reviewed-by: Edward Lemur Reviewed-by: Patrik Höglund Commit-Queue: Oleh Prypin Cr-Commit-Position: refs/heads/master@{#20545} --- tools_webrtc/autoroller/roll_deps.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools_webrtc/autoroller/roll_deps.py b/tools_webrtc/autoroller/roll_deps.py index b367633db2..aaf49fc4da 100755 --- a/tools_webrtc/autoroller/roll_deps.py +++ b/tools_webrtc/autoroller/roll_deps.py @@ -17,7 +17,7 @@ import os import re import subprocess import sys -import urllib +import urllib2 # Skip these dependencies (list without solution name prefix). @@ -170,7 +170,7 @@ def ReadRemoteCrCommit(revision): def ReadUrlContent(url): """Connect to a remote host and read the contents. Returns a list of lines.""" - conn = urllib.urlopen(url) + conn = urllib2.urlopen(url) try: return conn.readlines() except IOError as e: