tfix #3912 - electrum - Electrum Bitcoin wallet
HTML git clone https://git.parazyd.org/electrum
DIR Log
DIR Files
DIR Refs
DIR Submodules
---
DIR commit 945ba8decf2fb1c2d117edcb9252af8717788eba
DIR parent cd6067f38355a02327b17a4bc7436fb035acee2d
HTML Author: SomberNight <somber.night@protonmail.com>
Date: Fri, 16 Feb 2018 13:20:56 +0100
fix #3912
Diffstat:
M lib/exchange_rate.py | 4 ++++
1 file changed, 4 insertions(+), 0 deletions(-)
---
DIR diff --git a/lib/exchange_rate.py b/lib/exchange_rate.py
t@@ -107,6 +107,8 @@ class ExchangeBase(PrintError):
return []
def historical_rate(self, ccy, d_t):
+ if d_t is None:
+ return None
return self.history.get(ccy, {}).get(d_t.strftime('%Y-%m-%d'))
def get_currencies(self):
t@@ -519,6 +521,8 @@ class FxThread(ThreadJob):
return _("No data")
def history_rate(self, d_t):
+ if d_t is None:
+ return None
rate = self.exchange.historical_rate(self.ccy, d_t)
# Frequently there is no rate for today, until tomorrow :)
# Use spot quotes in that case