Skip to content
Snippets Groups Projects
Commit ea168353 authored by Adrien Béraud's avatar Adrien Béraud
Browse files

tools/scanner: use urllib3 streaming

parent 79b9c483
Branches
Tags
No related merge requests found
......@@ -74,7 +74,7 @@ def check_dl(fname, url):
if os.path.isfile(fname):
return
print('downloading', url)
ghandle = gzip.GzipFile(fileobj=http.request('GET', url, headers={'User-Agent': 'Mozilla/5.0'}))
ghandle = gzip.GzipFile(fileobj=http.request('GET', url, headers={'User-Agent': 'Mozilla/5.0'}, preload_content=False))
with open(fname, 'wb') as out:
for line in ghandle:
out.write(line)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment