fix api-discontinued breaking reports
This commit is contained in:
parent
f6d1e0ba16
commit
f2c6668e18
|
@ -617,8 +617,6 @@ class PriceCache(object):
|
||||||
self.providers.append(PROVIDER_TYPES[provider["provider"]](provider, self.log))
|
self.providers.append(PROVIDER_TYPES[provider["provider"]](provider, self.log))
|
||||||
|
|
||||||
def get_price(self, symbol, thresh):
|
def get_price(self, symbol, thresh):
|
||||||
if symbol in self.unsupported:
|
|
||||||
return
|
|
||||||
symbol = symbol.upper()
|
symbol = symbol.upper()
|
||||||
# load from cache
|
# load from cache
|
||||||
price = self._load_priceinfo(symbol)
|
price = self._load_priceinfo(symbol)
|
||||||
|
@ -626,6 +624,9 @@ class PriceCache(object):
|
||||||
if price and (thresh == -1 or time() - price.time < thresh):
|
if price and (thresh == -1 or time() - price.time < thresh):
|
||||||
return price
|
return price
|
||||||
|
|
||||||
|
if symbol in self.unsupported:
|
||||||
|
return
|
||||||
|
|
||||||
return self.api_fetch(symbol)
|
return self.api_fetch(symbol)
|
||||||
|
|
||||||
def api_fetch(self, symbol):
|
def api_fetch(self, symbol):
|
||||||
|
|
Loading…
Reference in New Issue