improve output of active post processor modules

This commit is contained in:
Mike Fährmann
2019-08-15 13:31:04 +02:00
parent 2cbbc3dec4
commit 5f8621b29d
2 changed files with 12 additions and 5 deletions

View File

@@ -336,7 +336,8 @@ class DownloadJob(Job):
postprocessors = self.extractor.config("postprocessors") postprocessors = self.extractor.config("postprocessors")
if postprocessors: if postprocessors:
self.postprocessors = [] pp_list = []
for pp_dict in postprocessors: for pp_dict in postprocessors:
whitelist = pp_dict.get("whitelist") whitelist = pp_dict.get("whitelist")
blacklist = pp_dict.get("blacklist") blacklist = pp_dict.get("blacklist")
@@ -355,9 +356,12 @@ class DownloadJob(Job):
"'%s' initialization failed: %s: %s", "'%s' initialization failed: %s: %s",
name, exc.__class__.__name__, exc) name, exc.__class__.__name__, exc)
else: else:
self.postprocessors.append(pp_obj) pp_list.append(pp_obj)
self.extractor.log.debug(
"Active postprocessor modules: %s", self.postprocessors) if pp_list:
self.postprocessors = pp_list
self.extractor.log.debug(
"Active postprocessor modules: %s", pp_list)
class SimulationJob(DownloadJob): class SimulationJob(DownloadJob):

View File

@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- 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 # 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 # it under the terms of the GNU General Public License version 2 as
@@ -23,3 +23,6 @@ class PostProcessor():
def finalize(self): def finalize(self):
"""Cleanup""" """Cleanup"""
def __repr__(self):
return self.__class__.__name__