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
1 changed files with 2 additions and 2 deletions

View File

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