Work around Bitcoin Venezuela serving NULLs.

Fixes #1510.
This commit is contained in:
Neil Booth 2015-10-24 23:23:43 +09:00
parent d48c211960
commit 7d0d2f2097
1 changed files with 3 additions and 2 deletions

View File

@ -112,8 +112,9 @@ class BitcoinAverage(ExchangeBase):
class BitcoinVenezuela(ExchangeBase):
def get_rates(self, ccy):
json = self.get_json('api.bitcoinvenezuela.com', '/')
return dict([(r, Decimal(json['BTC'][r]))
for r in json['BTC']])
rates = [(r, json['BTC'][r]) for r in json['BTC']
if json['BTC'][r] is not None] # Giving NULL for LTC
return dict(rates)
def protocol(self):
return "http"