Use urllib2 in roll_deps, which raises on non-200 HTTP status

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 <ehmaldonado@webrtc.org>
Reviewed-by: Patrik Höglund <phoglund@webrtc.org>
Commit-Queue: Oleh Prypin <oprypin@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20545}
This commit is contained in:
Oleh Prypin 2017-11-01 21:59:32 +01:00 committed by Commit Bot
parent 82c7eff42f
commit 7f6af7a36c

View File

@ -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: