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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user