From ee085e6d2bd97a8d8ce8c5097c89cdce8b5a26fd Mon Sep 17 00:00:00 2001 From: Micah Jerome Ellison Date: Sat, 26 Dec 2020 12:54:44 -0800 Subject: [PATCH] Fix jrnl --ls crash --- jrnl/output.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/jrnl/output.py b/jrnl/output.py index 43390346..60c5d5aa 100644 --- a/jrnl/output.py +++ b/jrnl/output.py @@ -23,13 +23,13 @@ def deprecated_cmd(old_cmd, new_cmd, callback=None, **kwargs): callback(**kwargs) -def list_journals(config): - from . import install +def list_journals(configuration): + from . import config """List the journals specified in the configuration file""" - result = f"Journals defined in {install.CONFIG_FILE_PATH}\n" - ml = min(max(len(k) for k in config["journals"]), 20) - for journal, cfg in config["journals"].items(): + result = f"Journals defined in {config.get_config_path()}\n" + ml = min(max(len(k) for k in configuration["journals"]), 20) + for journal, cfg in configuration["journals"].items(): result += " * {:{}} -> {}\n".format( journal, ml, cfg["journal"] if isinstance(cfg, dict) else cfg )