From 404c722920043caf548bf10c0242aac5d22a96b3 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 19 Oct 2017 19:56:18 +0200 Subject: Only pass cafile argument to urlopen in Python versions that support it. --- python/servo/bootstrap_commands.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'python/servo/bootstrap_commands.py') 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 -- cgit v1.2.3