1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-03 17:50:11 +02:00

makebuildserver: explicit timeout for cache downloading

This commit is contained in:
Michael Pöhn 2019-05-28 12:07:36 +02:00
parent 333098b95a
commit 06bbd3044b

View File

@ -452,8 +452,8 @@ def update_cache(cachedir):
logging.info("Downloading %s to cache", filename) logging.info("Downloading %s to cache", filename)
if download: if download:
r = requests.get(srcurl, headers=resume_header, r = requests.get(srcurl, headers=resume_header, stream=True,
stream=True, allow_redirects=True) allow_redirects=True, timeout=60)
content_length = int(r.headers.get('content-length')) content_length = int(r.headers.get('content-length'))
with open(local_filename, 'ab') as f: with open(local_filename, 'ab') as f:
for chunk in progress.bar(r.iter_content(chunk_size=65536), for chunk in progress.bar(r.iter_content(chunk_size=65536),