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/devenv_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/devenv_commands.py')
-rw-r--r-- | python/servo/devenv_commands.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/python/servo/devenv_commands.py b/python/servo/devenv_commands.py index 8f51cfcc44d..e6cb91bd20a 100644 --- a/python/servo/devenv_commands.py +++ b/python/servo/devenv_commands.py @@ -21,8 +21,9 @@ from mach.decorators import ( Command, ) -from servo.command_base import CommandBase, cd, call, STATIC_RUST_LANG_ORG_DIST +from servo.command_base import CommandBase, cd, call from servo.build_commands import notify_build_done +from servo.util import STATIC_RUST_LANG_ORG_DIST, URLOPEN_KWARGS @CommandProvider @@ -263,7 +264,7 @@ class MachCommands(CommandBase): category='devenv') def rustup(self): url = STATIC_RUST_LANG_ORG_DIST + "/channel-rust-nightly-date.txt" - nightly_date = urllib2.urlopen(url).read() + nightly_date = urllib2.urlopen(url, **URLOPEN_KWARGS).read() filename = path.join(self.context.topdir, "rust-toolchain") with open(filename, "w") as f: f.write("nightly-%s\n" % nightly_date) |