[pp:python] move '_init_archive()' after events (#8243)

This commit is contained in:
Mike Fährmann
2025-09-21 21:46:56 +02:00
parent 5066de020a
commit 09f0ba8e9c

View File

@@ -22,9 +22,6 @@ class PythonPP(PostProcessor):
module = util.import_file(module_name)
self.function = getattr(module, function_name)
if self._init_archive(job, options):
self.run = self.run_archive
events = options.get("event")
if events is None:
events = ("file",)
@@ -32,6 +29,9 @@ class PythonPP(PostProcessor):
events = events.split(",")
job.register_hooks({event: self.run for event in events}, options)
if self._init_archive(job, options):
self.run = self.run_archive
def run(self, pathfmt):
self.function(pathfmt.kwdict)