From f9c045a63efccb50ddec3af981b09e1ce72e308a Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Wed, 17 May 2017 12:36:04 -0400 Subject: [PATCH] historical: Switch to relative import. --- oxrlib/commands/historical.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oxrlib/commands/historical.py b/oxrlib/commands/historical.py index a3c36e3..c7d7f70 100644 --- a/oxrlib/commands/historical.py +++ b/oxrlib/commands/historical.py @@ -1,4 +1,4 @@ -import oxrlib.rate +from .. import rate as oxrrate def format_one_rate(rate, from_amt, from_curr, to_curr): return "{:g} {} = {:g} {}".format( @@ -11,7 +11,7 @@ def format_rate_pair(rate, from_curr, to_curr): def run(config, stdout, stderr): loaders = config.get_loaders() with loaders.historical(config.args.date, config.args.base) as rate_json: - rate = oxrlib.rate.Rate.from_json_file(rate_json) + rate = oxrrate.Rate.from_json_file(rate_json) if not config.args.from_currency: for from_curr in sorted(rate.rates): print(*format_rate_pair(rate, from_curr, config.args.to_currency),