From 66bdd06c51a913fc5782122f513d9f184961105d Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 19 Feb 2022 14:15:55 -0800 Subject: [PATCH] clean up error for manually stopping the inline editor --- jrnl/editor.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jrnl/editor.py b/jrnl/editor.py index 90ecb199..c00c4073 100644 --- a/jrnl/editor.py +++ b/jrnl/editor.py @@ -13,6 +13,7 @@ from jrnl.os_compat import split_args from jrnl.output import print_msg from jrnl.output import Message from jrnl.exception import JrnlException +from jrnl.exception import JrnlExceptionMessage def get_text_from_editor(config, template=""): @@ -60,7 +61,7 @@ def get_text_from_stdin(): raw = sys.stdin.read() except KeyboardInterrupt: logging.error("Write mode: keyboard interrupt") - print_msg("Entry NOT saved to journal", msg=Message.NORMAL) - raise JrnlException("KeyboardInterrupt") + print_msg("\nEntry NOT saved to journal", msg=Message.NORMAL) + raise JrnlException(JrnlExceptionMessage.KeyboardInterrupt) return raw