aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/bootstrap_commands.py
diff options
context:
space:
mode:
authorrwa <rwa@localhost.localdomain>2016-04-18 20:34:35 +0200
committerrwa <rwa@localhost.localdomain>2016-04-18 20:34:35 +0200
commit79a1dfe2263166fb4cea1c6469ad618251347755 (patch)
treece659e3144e56d75a23aa14c67d06941e264cc3d /python/servo/bootstrap_commands.py
parent080880b46a77eb84dc110e337f09d56d7d695ee2 (diff)
downloadservo-79a1dfe2263166fb4cea1c6469ad618251347755.tar.gz
servo-79a1dfe2263166fb4cea1c6469ad618251347755.zip
Handle URLError in download() #10679
Print a human-friendly message if there is no internet connection.
Diffstat (limited to 'python/servo/bootstrap_commands.py')
-rw-r--r--python/servo/bootstrap_commands.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py
index f7da1d60318..d49c1e431c9 100644
--- a/python/servo/bootstrap_commands.py
+++ b/python/servo/bootstrap_commands.py
@@ -63,6 +63,9 @@ def download(desc, src, writer, start_byte=0):
if not dumb:
print()
+ except urllib2.URLError:
+ print("Error downloading Rust compiler; are you connected to the internet?")
+ sys.exit(1)
except urllib2.HTTPError, e:
print("Download failed (%d): %s - %s" % (e.code, e.reason, src))
sys.exit(1)