electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 376a815458d7765c3e3b4c22b74552bd4702b163
parent e90a31ef2346b5f189056b53576ac91fc6e32110
Author: Filip Gospodinov <f@gospodinov.ch>
Date:   Wed, 25 Apr 2018 09:42:07 +0200

exchange_rate: prefer relative imports (#4308)

As this project is currently structured, absolute
imports have the drawback that they'll load modules
from installed paths rather then from the local repo
when running unit tests. This somehow breaks the main
idea of unit tests which is being able to quickly test
newest development changes. Therefore, use a relative
import here.
Diffstat:
Mlib/exchange_rate.py | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/exchange_rate.py b/lib/exchange_rate.py @@ -569,6 +569,6 @@ class FxThread(ThreadJob): return self.fiat_value(satoshis, self.history_rate(d_t)) def timestamp_rate(self, timestamp): - from electrum.util import timestamp_to_datetime + from .util import timestamp_to_datetime date = timestamp_to_datetime(timestamp) return self.history_rate(date)