mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-17 11:38:32 +02:00
get rid of old exception
This commit is contained in:
parent
94feae735e
commit
35cdd7bd59
2 changed files with 6 additions and 15 deletions
|
@ -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:
|
||||
|
|
17
jrnl/jrnl.py
17
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):
|
||||
|
|
Loading…
Add table
Reference in a new issue