[pp:python] move '_init_archive()' after events (#8243)
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user