Explicitly check for False in fetch_ticker

This commit is contained in:
Matthias 2020-12-13 10:59:29 +01:00
parent 1436dc58f5
commit 657b002a81

View File

@ -658,7 +658,8 @@ class Exchange:
@retrier
def fetch_ticker(self, pair: str) -> dict:
try:
if pair not in self._api.markets or not self._api.markets[pair].get('active'):
if (pair not in self._api.markets or
self._api.markets[pair].get('active', False) is False):
raise ExchangeError(f"Pair {pair} not available")
data = self._api.fetch_ticker(pair)
return data