From 3103cd4b34e5e1da7c209b666a6f13bbbe02b63b Mon Sep 17 00:00:00 2001 From: askeing Date: Fri, 29 Apr 2016 02:27:30 +0900 Subject: [PATCH] Handle HTTP specific errors then other errors when downloading rustc --- python/servo/bootstrap_commands.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py index d49c1e431c9..044cd8c80c4 100644 --- a/python/servo/bootstrap_commands.py +++ b/python/servo/bootstrap_commands.py @@ -63,11 +63,14 @@ 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)) + if e.code == 403: + print("No Rust compiler binary available for this platform. " + "Please see https://github.com/servo/servo/#prerequisites") + sys.exit(1) + except urllib2.URLError: + print("Error downloading Rust compiler; are you connected to the internet?") sys.exit(1) except KeyboardInterrupt: writer.flush()