зеркало из https://github.com/mozilla/gecko-dev.git
servo: Merge #10901 - Handle HTTP specific errors then other errors when downloading rustc (from askeing:fix_10882); r=jdm
fix #10882 Source-Repo: https://github.com/servo/servo Source-Revision: a98a53925f09a1b1d65c4680ca7990f9ac3ee1bc
This commit is contained in:
Родитель
3b1084584e
Коммит
9d3b92895f
|
@ -63,11 +63,14 @@ 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))
|
||||
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)
|
||||
except KeyboardInterrupt:
|
||||
writer.flush()
|
||||
|
|
Загрузка…
Ссылка в новой задаче