mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-04 19:09:44 +00:00
catch undefined profile
This commit is contained in:
@@ -854,6 +854,9 @@ def _exec_command(opts):
|
||||
LOG.dbg(f'running cmd: {command}')
|
||||
cmd_remove(opts)
|
||||
|
||||
except UndefinedException as exc:
|
||||
LOG.err(exc)
|
||||
ret = False
|
||||
except KeyboardInterrupt:
|
||||
LOG.err('interrupted')
|
||||
ret = False
|
||||
|
||||
@@ -16,6 +16,7 @@ from dotdrop.utils import strip_home, get_default_file_perms, \
|
||||
from dotdrop.linktypes import LinkTypes
|
||||
from dotdrop.comparator import Comparator
|
||||
from dotdrop.templategen import Templategen
|
||||
from dotdrop.exceptions import UndefinedException
|
||||
|
||||
|
||||
class Importer:
|
||||
@@ -35,8 +36,11 @@ class Importer:
|
||||
@debug: enable debug
|
||||
@keepdot: keep dot prefix
|
||||
@ignore: patterns to ignore when importing
|
||||
This may raise UndefinedException
|
||||
"""
|
||||
self.profile = profile
|
||||
if not self.profile:
|
||||
raise UndefinedException("profile is undefined")
|
||||
self.conf = conf
|
||||
self.dotpath = dotpath
|
||||
self.diff_cmd = diff_cmd
|
||||
|
||||
Reference in New Issue
Block a user