diff options
author | Simon Sapin <simon.sapin@exyr.org> | 2017-10-19 19:56:18 +0200 |
---|---|---|
committer | Simon Sapin <simon.sapin@exyr.org> | 2017-10-19 19:56:18 +0200 |
commit | 404c722920043caf548bf10c0242aac5d22a96b3 (patch) | |
tree | 4d499b5c5ef99d693cae65b8e0b061e89f79c237 /python/servo/bootstrap_commands.py | |
parent | aa62942fbd836279da8ea41d2e5d4ca9dd61fad3 (diff) | |
download | servo-404c722920043caf548bf10c0242aac5d22a96b3.tar.gz servo-404c722920043caf548bf10c0242aac5d22a96b3.zip |
Only pass cafile argument to urlopen in Python versions that support it.
Diffstat (limited to 'python/servo/bootstrap_commands.py')
-rw-r--r-- | python/servo/bootstrap_commands.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py index 46328563247..aa64060ecaa 100644 --- a/python/servo/bootstrap_commands.py +++ b/python/servo/bootstrap_commands.py @@ -27,8 +27,9 @@ from mach.decorators import ( ) import servo.bootstrap as bootstrap -from servo.command_base import CommandBase, BIN_SUFFIX, cd, STATIC_RUST_LANG_ORG_DIST +from servo.command_base import CommandBase, BIN_SUFFIX, cd from servo.util import delete, download_bytes, download_file, extract, host_triple +from servo.util import STATIC_RUST_LANG_ORG_DIST, URLOPEN_KWARGS @CommandProvider @@ -94,7 +95,8 @@ class MachCommands(CommandBase): else: import toml channel = nightly_dist + "/channel-rust-nightly.toml" - nightly_commit_hash = toml.load(urllib2.urlopen(channel))["pkg"]["rustc"]["git_commit_hash"] + manifest = toml.load(urllib2.urlopen(channel, **URLOPEN_KWARGS)) + nightly_commit_hash = manifest["pkg"]["rustc"]["git_commit_hash"] base_url = "https://s3.amazonaws.com/rust-lang-ci/rustc-builds-alt/" + nightly_commit_hash |