From ceacbc0a034b680a045aebce6fa732c79eef9ca9 Mon Sep 17 00:00:00 2001 From: deadc0de6 Date: Thu, 20 Jun 2019 14:13:36 +0200 Subject: [PATCH] fix keyerror on action execution --- dotdrop/action.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/dotdrop/action.py b/dotdrop/action.py index 072d9dd..fb3c78a 100644 --- a/dotdrop/action.py +++ b/dotdrop/action.py @@ -104,6 +104,11 @@ class Action(Cmd): err += ' with \"{}\"'.format(args) self.log.warn(err) return False + except KeyError: + err = 'bad action: \"{}\"'.format(action) + err += ' with \"{}\"'.format(args) + self.log.warn(err) + return False self.log.sub('executing \"{}\"'.format(cmd)) try: ret = subprocess.call(cmd, shell=True)