mirror of
https://github.com/servo/servo.git
synced 2025-08-01 19:50:30 +01:00
Auto merge of #10689 - rwakulszowa:bootstrap-disconnected-message, r=Wafflespeanut
Handle URLError in download() #10679 Print a human-friendly message if there is no internet connection. <!-- 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/10689) <!-- Reviewable:end -->
This commit is contained in:
commit
f73c6143d5
1 changed files with 3 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue