From b18484ad85ad7ba394d1c6467d06d997811d9e94 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Sat, 23 Dec 2017 20:12:03 +0100 Subject: [PATCH] handle config exception --- dotdrop/dotdrop.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dotdrop/dotdrop.py b/dotdrop/dotdrop.py index 6a1d321..dbe0596 100644 --- a/dotdrop/dotdrop.py +++ b/dotdrop/dotdrop.py @@ -220,7 +220,11 @@ def header(): def main(): ret = True args = docopt(USAGE, version=VERSION) - conf = Cfg(args['--cfg']) + try: + conf = Cfg(args['--cfg']) + except ValueError as e: + LOG.err('error: %s' % (str(e))) + return False opts = conf.get_configs() opts['dry'] = args['--dry']