From 35cdd7bd595271739d7d8eabbe90568ec771cc99 Mon Sep 17 00:00:00 2001 From: Jonathan Wren Date: Sat, 19 Feb 2022 17:00:52 -0800 Subject: [PATCH] get rid of old exception --- jrnl/exception.py | 4 ---- jrnl/jrnl.py | 17 ++++++----------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/jrnl/exception.py b/jrnl/exception.py index a8a94b48..2ab0956b 100644 --- a/jrnl/exception.py +++ b/jrnl/exception.py @@ -5,10 +5,6 @@ import textwrap from enum import Enum -class UserAbort(Exception): - pass - - class JrnlExceptionMessage(Enum): ConfigDirectoryIsFile = """ The path to your jrnl configuration directory is a file, not a directory: diff --git a/jrnl/jrnl.py b/jrnl/jrnl.py index fc79edb3..a36025f4 100644 --- a/jrnl/jrnl.py +++ b/jrnl/jrnl.py @@ -14,7 +14,6 @@ from .config import scope_config from .config import get_config_path from .editor import get_text_from_editor from .editor import get_text_from_stdin -from .exception import UserAbort from . import time from .override import apply_overrides @@ -38,18 +37,14 @@ def run(args): return args.preconfig_cmd(args) # Load the config, and extract journal name - try: - config = install.load_or_install_jrnl(args.config_file_path) - original_config = config.copy() + config = install.load_or_install_jrnl(args.config_file_path) + original_config = config.copy() - # Apply config overrides - config = apply_overrides(args, config) + # Apply config overrides + config = apply_overrides(args, config) - args = get_journal_name(args, config) - config = scope_config(config, args.journal_name) - except UserAbort as err: - print(f"\n{err}", file=sys.stderr) - sys.exit(1) + args = get_journal_name(args, config) + config = scope_config(config, args.journal_name) # Run post-config command now that config is ready if callable(args.postconfig_cmd):