From f1d42fe787c20ff2d62b0aab00874fe9c79af352 Mon Sep 17 00:00:00 2001 From: marmeladema Date: Mon, 14 Oct 2019 00:36:20 +0100 Subject: Use urllib from six module in order to be compatible with Python3 --- python/servo/devenv_commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'python/servo/devenv_commands.py') diff --git a/python/servo/devenv_commands.py b/python/servo/devenv_commands.py index ad5a02c270d..266d2cfd6a5 100644 --- a/python/servo/devenv_commands.py +++ b/python/servo/devenv_commands.py @@ -14,7 +14,7 @@ from time import time import signal import sys import tempfile -import urllib2 +import six.moves.urllib as urllib import json import subprocess @@ -201,7 +201,7 @@ class MachCommands(CommandBase): category='devenv') def rustup(self): url = get_static_rust_lang_org_dist() + "/channel-rust-nightly-date.txt" - nightly_date = urllib2.urlopen(url, **get_urlopen_kwargs()).read() + nightly_date = urllib.request.urlopen(url, **get_urlopen_kwargs()).read() toolchain = "nightly-" + nightly_date filename = path.join(self.context.topdir, "rust-toolchain") with open(filename, "w") as f: -- cgit v1.2.3