diff --git a/oxrlib/commands/historical.py b/oxrlib/commands/historical.py index a3c36e3dd96e954664757b757847da57f00922f8..c7d7f705a83bfed9c93a6a84885b55e19be2ce9b 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),