From 02dfdc1dfe82b20edea8a49507b89657e6aba450 Mon Sep 17 00:00:00 2001 From: "Mr.Servo" Date: Thu, 4 Apr 2024 23:24:50 +0200 Subject: [PATCH] [Piconsupdater] timeout for internet-access added --- PiconsUpdater/src/DownloadJob.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PiconsUpdater/src/DownloadJob.py b/PiconsUpdater/src/DownloadJob.py index 2de251af3..86452534a 100644 --- a/PiconsUpdater/src/DownloadJob.py +++ b/PiconsUpdater/src/DownloadJob.py @@ -18,7 +18,7 @@ def stop(self): def downloadPage(self, link, file, success, fail=None): link = link.encode('ascii', 'xmlcharrefreplace').decode().replace(' ', '%20').replace('\n', '').encode('utf-8') try: - response = get(link) + response = get(link, timeout=(3.05, 6)) content = response.content response.raise_for_status() with open(file, "wb") as f: