We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 22526dd commit ed15db5Copy full SHA for ed15db5
scripts/python/build.py
@@ -39,7 +39,7 @@
39
import zipfile
40
import hashlib
41
import ssl
42
-import urllib.request
+import requests
43
import subprocess
44
import multiprocessing
45
@@ -185,7 +185,9 @@ def check_md5_hash(path, md5_hash):
185
186
def download_zipfile(url, archive_path, unzip_path, md5_hash):
187
if not os.path.exists(archive_path):
188
- urllib.request.urlretrieve(url, archive_path)
+ r = requests.get(url)
189
+ with open(archive_path, 'wb') as outfile:
190
+ outfile.write(r.content)
191
check_md5_hash(archive_path, md5_hash)
192
with zipfile.ZipFile(archive_path, "r") as fid:
193
fid.extractall(unzip_path)
0 commit comments