tFix #3907 - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit e3a082d58dff5d2cf4ca8b42fc285ff34b995aba DIR parent 08b9908f6e9a86162061293e1dad9caf6b14e3e0 HTML Author: Johann Bauer <bauerj@bauerj.eu> Date: Wed, 14 Feb 2018 21:58:35 +0100 Fix #3907 Diffstat: M lib/exchange_rate.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- DIR diff --git a/lib/exchange_rate.py b/lib/exchange_rate.py t@@ -79,7 +79,7 @@ class ExchangeBase(PrintError): return h, timestamp def get_historical_rates_safe(self, ccy, cache_dir): - h, timestamp = self.read_historical_rates() + h, timestamp = self.read_historical_rates(ccy, cache_dir) if h is None or time.time() - timestamp < 24*3600: try: self.print_error("requesting fx history for", ccy) t@@ -89,6 +89,7 @@ class ExchangeBase(PrintError): except BaseException as e: self.print_error("failed fx history:", e) return + filename = os.path.join(cache_dir, self.name() + '_' + ccy) with open(filename, 'w') as f: f.write(json.dumps(h)) self.history[ccy] = h