mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-03 07:16:12 +02:00
Handle KeyboardInterrupt when installing journal
This commit is contained in:
parent
e14910c83f
commit
bd806efb98
4 changed files with 24 additions and 8 deletions
|
@ -12,6 +12,7 @@ from . import upgrade
|
|||
from . import __version__
|
||||
from .Journal import PlainJournal
|
||||
from .EncryptedJournal import EncryptedJournal
|
||||
from .util import UserAbort
|
||||
import yaml
|
||||
import logging
|
||||
import sys
|
||||
|
@ -101,7 +102,11 @@ def load_or_install_jrnl():
|
|||
return config
|
||||
else:
|
||||
log.debug('Configuration file not found, installing jrnl...')
|
||||
return install()
|
||||
try:
|
||||
config = install()
|
||||
except KeyboardInterrupt:
|
||||
raise UserAbort("Installation aborted")
|
||||
return config
|
||||
|
||||
|
||||
def install():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue