ignore unkown errors for coverage

This commit is contained in:
Matthias 2022-03-13 20:45:40 +01:00
parent 1b9e980144
commit df74bdfacd
No known key found for this signature in database
GPG Key ID: F50EF5741D33E076

View File

@ -248,7 +248,7 @@ def update_exchange_rates():
# Apps not yet loaded!
logger.info("Could not perform 'update_exchange_rates' - App registry not ready")
return
except:
except: # pragma: no cover
# Other error?
return
@ -257,7 +257,7 @@ def update_exchange_rates():
backend = ExchangeBackend.objects.get(name='InvenTreeExchange')
except ExchangeBackend.DoesNotExist:
pass
except:
except: # pragma: no cover
# Some other error
logger.warning("update_exchange_rates: Database not ready")
return
@ -274,7 +274,7 @@ def update_exchange_rates():
# Remove any exchange rates which are not in the provided currencies
Rate.objects.filter(backend="InvenTreeExchange").exclude(currency__in=currency_codes()).delete()
except Exception as e:
except Exception as e: # pragma: no cover
logger.error(f"Error updating exchange rates: {e}")