diff --git a/gallery_dl/job.py b/gallery_dl/job.py index 1d7c5fcb..6d81e662 100644 --- a/gallery_dl/job.py +++ b/gallery_dl/job.py @@ -336,7 +336,8 @@ class DownloadJob(Job): postprocessors = self.extractor.config("postprocessors") if postprocessors: - self.postprocessors = [] + pp_list = [] + for pp_dict in postprocessors: whitelist = pp_dict.get("whitelist") blacklist = pp_dict.get("blacklist") @@ -355,9 +356,12 @@ class DownloadJob(Job): "'%s' initialization failed: %s: %s", name, exc.__class__.__name__, exc) else: - self.postprocessors.append(pp_obj) - self.extractor.log.debug( - "Active postprocessor modules: %s", self.postprocessors) + pp_list.append(pp_obj) + + if pp_list: + self.postprocessors = pp_list + self.extractor.log.debug( + "Active postprocessor modules: %s", pp_list) class SimulationJob(DownloadJob): diff --git a/gallery_dl/postprocessor/common.py b/gallery_dl/postprocessor/common.py index c642f0f9..b967cf6a 100644 --- a/gallery_dl/postprocessor/common.py +++ b/gallery_dl/postprocessor/common.py @@ -1,6 +1,6 @@ # -*- coding: utf-8 -*- -# Copyright 2018 Mike Fährmann +# Copyright 2018-2019 Mike Fährmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as @@ -23,3 +23,6 @@ class PostProcessor(): def finalize(self): """Cleanup""" + + def __repr__(self): + return self.__class__.__name__