[Datasheet dowload] Catch requests.exceptions.TooManyRedirects
Closes #408
This commit is contained in:
parent
786c94a80c
commit
f7d52f3d09
|
|
@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- `default_resistor_tolerance` which tolerance to use when none found.
|
||||
- `cache_3d_resistors` to avoid generating them all the time.
|
||||
- 3D: colored 3D models for THT resistors
|
||||
- Datasheet download:
|
||||
- Avoid interruptions when too many redirections is detected (#408)
|
||||
|
||||
### Fixed
|
||||
- Makefile: don't skip all preflights on each run, just the ones we generate
|
||||
|
|
|
|||
|
|
@ -75,6 +75,9 @@ class Download_Datasheets_Options(VariantOptions):
|
|||
except requests.exceptions.SSLError:
|
||||
logger.warning(W_FAILDL+'SSL Error during download `{}`'.format(ds))
|
||||
return None
|
||||
except requests.exceptions.TooManyRedirects:
|
||||
logger.warning(W_FAILDL+'More than 30 redirections downloading `{}`'.format(ds))
|
||||
return None
|
||||
if r.status_code != 200:
|
||||
logger.warning(W_FAILDL+'Failed to download `{}`'.format(ds))
|
||||
return None
|
||||
|
|
|
|||
Loading…
Reference in New Issue