tWork around Bitcoin Venezuela serving NULLs. - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 7d0d2f20976c7f0867f88f28b0d000ec9158b9ad
DIR parent d48c2119609c5660fb7ad5a7156e007eec0cf3e5
HTML Author: Neil Booth <kyuupichan@gmail.com>
Date: Sat, 24 Oct 2015 23:23:43 +0900
Work around Bitcoin Venezuela serving NULLs.
Fixes #1510.
Diffstat:
M plugins/exchange_rate.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
---
DIR diff --git a/plugins/exchange_rate.py b/plugins/exchange_rate.py
t@@ -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"