mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-05-17 11:38:32 +02:00
update upgrade module to use new message handling
This commit is contained in:
parent
f1119e1593
commit
93650f9927
2 changed files with 3 additions and 2 deletions
|
@ -94,7 +94,7 @@ class MsgText(Enum):
|
|||
|
||||
NoDefaultJournal = "No default journal configured\n{journals}"
|
||||
|
||||
FileDoesNotExist = "{filename} does not exist"
|
||||
DoesNotExist = "{name} does not exist"
|
||||
|
||||
# --- Journal status ---#
|
||||
JournalNotSaved = "Entry NOT saved to journal"
|
||||
|
|
|
@ -37,7 +37,7 @@ def backup(filename, binary=False):
|
|||
|
||||
except FileNotFoundError:
|
||||
print_msg(
|
||||
Message(MsgText.FileDoesNotExist, MsgType.WARNING, {"filename": filename})
|
||||
Message(MsgText.DoesNotExist, MsgType.WARNING, {"name": filename})
|
||||
)
|
||||
cont = yesno(f"\nCreate {filename}?", default=False)
|
||||
if not cont:
|
||||
|
@ -73,6 +73,7 @@ def upgrade_jrnl(config_path):
|
|||
path = os.path.expanduser(path)
|
||||
else:
|
||||
print(f"\nError: {path} does not exist.")
|
||||
print_msg(Message(MsgText.DoesNotExist, MsgType.ERROR, {"name": path}))
|
||||
continue
|
||||
|
||||
if encrypt:
|
||||
|
|
Loading…
Add table
Reference in a new issue