From 9fb443b495ab8daa6d7b68ec8565791aa5f9334d Mon Sep 17 00:00:00 2001 From: Bastien Le Querrec <blq@laquadrature.net> Date: Wed, 6 Mar 2024 17:19:26 +0100 Subject: [PATCH] =?UTF-8?q?ppparis:=20correction=20des=20exceptions=20trai?= =?UTF-8?q?t=C3=A9es?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ppparis.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ppparis.py b/ppparis.py index aa224e4..e8b4faa 100755 --- a/ppparis.py +++ b/ppparis.py @@ -50,7 +50,7 @@ def download_file(url, dest): f = open(dest,'wb') f.write(file.content); f.close() - except (requests.ConnectionError, requests.ChunkedEncodingError): + except (requests.exceptions.ConnectionError, requests.exceptions.ChunkedEncodingError): logging.warning(f'ATTENTION: la connexion a été interrompue pendant le téléchargement de {url}, nouvelle tentative...') download_file(url, dest) except Exception as exc: -- GitLab