From 3ab93dcdd50bb094c34cc3d6ba7fe8492ddca8a0 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 21 Jan 2022 02:17:30 +0100 Subject: [PATCH] only one exception type needed --- InvenTree/InvenTree/exchange.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InvenTree/InvenTree/exchange.py b/InvenTree/InvenTree/exchange.py index 936dd7a76e..d3ffcfb8cd 100644 --- a/InvenTree/InvenTree/exchange.py +++ b/InvenTree/InvenTree/exchange.py @@ -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__: