Fix crash when no editor configured

This commit is contained in:
Micah Jerome Ellison 2020-12-26 12:57:35 -08:00
parent ee085e6d2b
commit 8272a43ba7

View file

@ -11,6 +11,7 @@ from .color import ERROR_COLOR
from .color import RESET_COLOR from .color import RESET_COLOR
from .config import get_journal_name from .config import get_journal_name
from .config import scope_config from .config import scope_config
from .config import get_config_path
from .editor import get_text_from_editor from .editor import get_text_from_editor
from .editor import get_text_from_stdin from .editor import get_text_from_stdin
from .exception import UserAbort from .exception import UserAbort
@ -228,7 +229,7 @@ def _edit_search_results(config, journal, old_entries, **kwargs):
f""" f"""
[{ERROR_COLOR}ERROR{RESET_COLOR}: There is no editor configured.] [{ERROR_COLOR}ERROR{RESET_COLOR}: There is no editor configured.]
Please specify an editor in config file ({install.CONFIG_FILE_PATH}) Please specify an editor in config file ({get_config_path()})
to use the --edit option. to use the --edit option.
""", """,
file=sys.stderr, file=sys.stderr,