Merge pull request #290 from fionn-r/patch-1

Catch ConnectionError when downloading datasheets #289
This commit is contained in:
Salvador E. Tropea 2022-09-14 10:31:43 -03:00 committed by GitHub
commit 931d03a244
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:
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