From b2ea464250c1030d0ef197c0922083a4e9cfd40a Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 17 Apr 2023 19:48:33 +0200 Subject: [PATCH] Handle individual exceptions when initializing leverage tiers closes #8515 closes #8512 closes #8514 --- freqtrade/exchange/exchange.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index b5ea247ef..fd9ddfba6 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -2404,17 +2404,18 @@ class Exchange: with self._loop_lock: results = self.loop.run_until_complete(gather_results()) - for symbol, res in results: - tiers[symbol] = res + for res in results: + if isinstance(res, Exception): + logger.warning(f"Leverage tier exception: {repr(res)}") + continue + symbol, tier = res + tiers[symbol] = tier if len(coros) > 0: self.cache_leverage_tiers(tiers, self._config['stake_currency']) logger.info(f"Done initializing {len(symbols)} markets.") return tiers - else: - return {} - else: - return {} + return {} def cache_leverage_tiers(self, tiers: Dict[str, List[Dict]], stake_currency: str) -> None: