aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/servo/util.py')
-rw-r--r--python/servo/util.py23
1 files changed, 1 insertions, 22 deletions
diff --git a/python/servo/util.py b/python/servo/util.py
index 43769e181de..fb1efcf382d 100644
--- a/python/servo/util.py
+++ b/python/servo/util.py
@@ -25,29 +25,8 @@ import six
from io import BufferedIOBase, BytesIO
from socket import error as socket_error
-try:
- from ssl import HAS_SNI
-except ImportError:
- HAS_SNI = False
-
SCRIPT_PATH = os.path.abspath(os.path.dirname(__file__))
SERVO_ROOT = os.path.abspath(os.path.join(SCRIPT_PATH, "..", ".."))
-HAS_SNI_AND_RECENT_PYTHON = HAS_SNI and sys.version_info >= (2, 7, 9)
-
-
-def get_static_rust_lang_org_dist():
- if HAS_SNI_AND_RECENT_PYTHON:
- return "https://static.rust-lang.org/dist"
-
- return "https://static-rust-lang-org.s3.amazonaws.com/dist"
-
-
-def get_urlopen_kwargs():
- # The cafile parameter was added in 2.7.9
- if HAS_SNI_AND_RECENT_PYTHON:
- import certifi
- return {"cafile": certifi.where()}
- return {}
def remove_readonly(func, path, _):
@@ -74,7 +53,7 @@ def download(description: str, url: str, writer: BufferedIOBase, start_byte: int
req = urllib.request.Request(url)
if start_byte:
req = urllib.request.Request(url, headers={'Range': 'bytes={}-'.format(start_byte)})
- resp = urllib.request.urlopen(req, **get_urlopen_kwargs())
+ resp = urllib.request.urlopen(req)
fsize = None
if resp.info().get('Content-Length'):