diff --git a/gallery_dl/job.py b/gallery_dl/job.py index 20435975..0a7cce1f 100644 --- a/gallery_dl/job.py +++ b/gallery_dl/job.py @@ -330,7 +330,7 @@ class DownloadJob(Job): pp_obj = pp_cls(self.pathfmt, pp_dict) except Exception as exc: postprocessor.log.error( - "%s: initialization failed: %s %s", + "'%s' initialization failed: %s: %s", name, exc.__class__.__name__, exc) else: self.postprocessors.append(pp_obj) diff --git a/gallery_dl/postprocessor/exec.py b/gallery_dl/postprocessor/exec.py index 7d190402..c86b4805 100644 --- a/gallery_dl/postprocessor/exec.py +++ b/gallery_dl/postprocessor/exec.py @@ -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