Catch timeout connection then fallback

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
This commit is contained in:
Hiroshi Miura
2021-02-13 11:29:57 +09:00
parent 8bb391f63f
commit c4b488bd22
2 changed files with 5 additions and 2 deletions

View File

@@ -184,7 +184,7 @@ class QtArchives:
def _download_update_xml(self, update_xml_url):
try:
r = requests.get(update_xml_url, timeout=self.timeout)
except (ConnectionResetError, requests.exceptions.ConnectionError):
except (ConnectionResetError, requests.exceptions.ConnectionError, requests.exceptions.ReadTimeout):
raise ArchiveConnectionError()
else:
if r.status_code == 200: