From 44d3eac6e29a33b69aabc1e796cf415115ef0d0c Mon Sep 17 00:00:00 2001 From: Henning Kleen Date: Tue, 26 Jul 2022 09:28:46 +0200 Subject: [PATCH] catch possible SSLError when downloading datasheets to prevent KiBot crash. --- 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 afd74c98..7f6fc1c6 100644 --- a/kibot/out_download_datasheets.py +++ b/kibot/out_download_datasheets.py @@ -68,6 +68,9 @@ class Download_Datasheets_Options(VariantOptions): except requests.exceptions.ReadTimeout: logger.warning(W_FAILDL+'Timeout during download `{}`'.format(ds)) return None + except requests.exceptions.SSLError: + logger.warning(W_FAILDL+'SSL Error during download `{}`'.format(ds)) + return None if r.status_code != 200: logger.warning(W_FAILDL+'Failed to download `{}`'.format(ds)) return None