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
This commit is contained in:
Per Lundberg 2016-06-01 08:24:56 -05:00
Родитель 7fb96a2fc4
Коммит e9dcd1910d
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -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()