[pp:python] restore archive functionality

fixes regression introduced in 09f0ba8e9c
This commit is contained in:
Mike Fährmann
2025-09-26 21:55:37 +02:00
parent 9c4d20e926
commit eee78f8148
5 changed files with 67 additions and 9 deletions

View File

@@ -26,6 +26,9 @@ class PythonPP(PostProcessor):
module = util.import_file(module_name)
self.function = getattr(module, function_name)
if archive := self._archive_init(job, options):
self.run = self.run_archive
events = options.get("event")
if events is None:
events = ("file",)
@@ -33,8 +36,8 @@ 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
if archive:
self._archive_register(job)
def run(self, pathfmt):
self.function(pathfmt.kwdict)