mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
ignore unkown errors for coverage
This commit is contained in:
parent
1b9e980144
commit
df74bdfacd
@ -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}")
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user