only one exception type needed

This commit is contained in:
Matthias 2022-01-21 02:17:30 +01:00
parent 02058389b2
commit 3ab93dcdd5
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -31,7 +31,7 @@ class InvenTreeExchange(SimpleExchangeBackend):
try:
super().update_rates(base=base_currency, symbols=symbols)
# catch connection errors
except (HTTPError, URLError):
except URLError:
print('Encountered connection error while updating')
except OperationalError as e:
if 'SerializationFailure' in e.__cause__.__class__.__name__: