[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)
|
module = util.import_file(module_name)
|
||||||
self.function = getattr(module, function_name)
|
self.function = getattr(module, function_name)
|
||||||
|
|
||||||
if self._init_archive(job, options):
|
|
||||||
self.run = self.run_archive
|
|
||||||
|
|
||||||
events = options.get("event")
|
events = options.get("event")
|
||||||
if events is None:
|
if events is None:
|
||||||
events = ("file",)
|
events = ("file",)
|
||||||
@@ -32,6 +29,9 @@ class PythonPP(PostProcessor):
|
|||||||
events = events.split(",")
|
events = events.split(",")
|
||||||
job.register_hooks({event: self.run for event in events}, options)
|
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):
|
def run(self, pathfmt):
|
||||||
self.function(pathfmt.kwdict)
|
self.function(pathfmt.kwdict)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user