Catch ConnectionError when downloading datasheets #289

This commit is contained in:
fionn-r 2022-09-14 14:53:13 +02:00 committed by GitHub
parent 5f123dd143
commit 64eb629d73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -69,6 +69,9 @@ class Download_Datasheets_Options(VariantOptions):
except requests.exceptions.ReadTimeout: except requests.exceptions.ReadTimeout:
logger.warning(W_FAILDL+'Timeout during download `{}`'.format(ds)) logger.warning(W_FAILDL+'Timeout during download `{}`'.format(ds))
return None return None
except requests.exceptions.ConnectionError:
logger.warning(W_FAILDL+'Connection error during download `{}`'.format(ds))
return None
if r.status_code != 200: if r.status_code != 200:
logger.warning(W_FAILDL+'Failed to download `{}`'.format(ds)) logger.warning(W_FAILDL+'Failed to download `{}`'.format(ds))
return None return None