mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
only one exception type needed
This commit is contained in:
parent
02058389b2
commit
3ab93dcdd5
@ -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__:
|
||||
|
Loading…
Reference in New Issue
Block a user