From e9dcd1910d0ad4c201b40bb0c2309f238bb0df7c Mon Sep 17 00:00:00 2001 From: Per Lundberg Date: Wed, 1 Jun 2016 08:24:56 -0500 Subject: [PATCH] servo: Merge #11525 - Provide a better error message when downloading rustc fails (from perlun:better-error-when-rustc-download-fails); r=jdm I was running into the error below locally. The previous version of the code hid away important details that helps when debugging; hence, this suggested change. > Error downloading Rust compiler: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590). URL: https://static-rust-lang-org.s3.amazonaws.com/dist/2016-05-17/rustc-nightly-x86_64-pc-windows-gnu.tar.gz Source-Repo: https://github.com/servo/servo Source-Revision: 8d7ceae1515057afc21c5c2e15d8e8d3683a16ce --- servo/python/servo/bootstrap_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/servo/python/servo/bootstrap_commands.py b/servo/python/servo/bootstrap_commands.py index 5630b778771c..659826fea66a 100644 --- a/servo/python/servo/bootstrap_commands.py +++ b/servo/python/servo/bootstrap_commands.py @@ -69,8 +69,8 @@ def download(desc, src, writer, start_byte=0): 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?") + except urllib2.URLError, e: + print("Error downloading Rust compiler: " + str(e.reason) + ". The failing URL was: " + src) sys.exit(1) except KeyboardInterrupt: writer.flush()