mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Handle URLError in download() #10679
Print a human-friendly message if there is no internet connection.
This commit is contained in:
parent
080880b46a
commit
79a1dfe226
1 changed files with 3 additions and 0 deletions
|
@ -63,6 +63,9 @@ 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))
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue