From 64eb629d735724c4acf7c571dc3c319e5aa68257 Mon Sep 17 00:00:00 2001 From: fionn-r Date: Wed, 14 Sep 2022 14:53:13 +0200 Subject: [PATCH] Catch ConnectionError when downloading datasheets #289 --- kibot/out_download_datasheets.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kibot/out_download_datasheets.py b/kibot/out_download_datasheets.py index 94f206b6..791834ad 100644 --- a/kibot/out_download_datasheets.py +++ b/kibot/out_download_datasheets.py @@ -69,6 +69,9 @@ class Download_Datasheets_Options(VariantOptions): except requests.exceptions.ReadTimeout: logger.warning(W_FAILDL+'Timeout during download `{}`'.format(ds)) return None + except requests.exceptions.ConnectionError: + logger.warning(W_FAILDL+'Connection error during download `{}`'.format(ds)) + return None if r.status_code != 200: logger.warning(W_FAILDL+'Failed to download `{}`'.format(ds)) return None