mirror of
https://github.com/servo/servo.git
synced 2025-08-01 03:30:33 +01:00
Auto merge of #10901 - askeing:fix_10882, r=jdm
Handle HTTP specific errors then other errors when downloading rustc fix #10882 <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="35" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/10901) <!-- Reviewable:end -->
This commit is contained in:
commit
a98a53925f
1 changed files with 6 additions and 3 deletions
|
@ -63,11 +63,14 @@ def download(desc, src, writer, start_byte=0):
|
||||||
|
|
||||||
if not dumb:
|
if not dumb:
|
||||||
print()
|
print()
|
||||||
except urllib2.URLError:
|
|
||||||
print("Error downloading Rust compiler; are you connected to the internet?")
|
|
||||||
sys.exit(1)
|
|
||||||
except urllib2.HTTPError, e:
|
except urllib2.HTTPError, e:
|
||||||
print("Download failed (%d): %s - %s" % (e.code, e.reason, src))
|
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)
|
sys.exit(1)
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
writer.flush()
|
writer.flush()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue