tfix exchange_rate class naming issue - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 0e11accd7be4618ae156403709558a683e52d945
DIR parent 7c0d18d4eec027748f259116b3f63a3f5626e184
HTML Author: ThomasV <thomasv@electrum.org>
Date: Thu, 9 Feb 2017 17:27:11 +0100
fix exchange_rate class naming issue
Diffstat:
M lib/exchange_rate.py | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
---
DIR diff --git a/lib/exchange_rate.py b/lib/exchange_rate.py
t@@ -152,9 +152,6 @@ class BlockchainInfo(ExchangeBase):
json = self.get_json('blockchain.info', '/ticker')
return dict([(r, Decimal(json[r]['15m'])) for r in json])
- def name(self):
- return "Blockchain"
-
class BTCChina(ExchangeBase):
def get_rates(self, ccy):
json = self.get_json('data.btcchina.com', '/data/ticker')
t@@ -384,7 +381,7 @@ class FxThread(ThreadJob):
self.on_quotes()
def set_exchange(self, name):
- class_ = globals()[name]
+ class_ = globals().get(name, BitcoinAverage)
self.print_error("using exchange", name)
if self.config_exchange() != name:
self.config.set_key('use_exchange', name, True)