1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-06 00:53:04 +00:00

exceptions and linting

This commit is contained in:
deadc0de6
2023-02-05 17:58:40 +01:00
committed by deadc0de
parent 82cdbc3703
commit 43b2d9ec54
5 changed files with 29 additions and 12 deletions

View File

@@ -24,7 +24,8 @@ from dotdrop.utils import get_tmpdir, removepath, \
adapt_workers, check_version, pivot_path
from dotdrop.linktypes import LinkTypes
from dotdrop.exceptions import YamlException, \
UndefinedException, UnmetDependency
UndefinedException, UnmetDependency, \
ConfigException, OptionsException
LOG = Logger()
TRANS_SUFFIX = 'trans'
@@ -877,10 +878,16 @@ def main():
try:
opts = Options()
except YamlException as exc:
LOG.err(f'config error: {exc}')
LOG.err(f'error (yaml): {exc}')
return False
except ConfigException as exc:
LOG.err(f'error (config): {exc}')
return False
except UndefinedException as exc:
LOG.err(f'config error: {exc}')
LOG.err(f'error (deps): {exc}')
return False
except OptionsException as exc:
LOG.err(f'error (options): {exc}')
return False
if opts.debug: