[postprocessor:exec] add a better error message (#155)

This commit is contained in:
Mike Fährmann
2019-01-13 13:59:11 +01:00
parent 89df37a173
commit 5f38ac9609
2 changed files with 8 additions and 2 deletions

View File

@@ -16,7 +16,13 @@ class ExecPP(PostProcessor):
def __init__(self, pathfmt, options):
PostProcessor.__init__(self)
self.args = options["command"]
try:
self.args = options["command"]
self.args[0] # test if 'args' is subscriptable
except (KeyError, IndexError, TypeError):
raise TypeError("option 'command' must be a non-empty list")
if options.get("async", False):
self._exec = subprocess.Popen