1
0
mirror of https://github.com/CMiksche/gitea-auto-update synced 2025-12-12 17:07:22 +01:00

feat: add timeout

Add a timeout for the requests.
This commit is contained in:
Christoph Miksche
2022-09-04 16:07:41 +02:00
parent 6f85b5b0a3
commit 8b30f0b9d5
3 changed files with 6 additions and 5 deletions

View File

@@ -24,7 +24,7 @@ def download(url, file_name):
# open in binary mode
with open(file_name, "wb") as file:
# get request
response = requests.get(url)
response = requests.get(url, timeout=3600)
# write to file
file.write(response.content)