[job] fix 'AttributeError' when enabling 'init' for non-DownloadJob

fixes bug in 56dcd00391
This commit is contained in:
Mike Fährmann
2026-02-03 19:00:45 +01:00
parent 0be3383110
commit f0f9575406
2 changed files with 64 additions and 6 deletions

View File

@@ -268,6 +268,9 @@ class Job():
for key, valuegen in self.kwdict_eval:
kwdict[key] = valuegen(kwdict)
def initialize(self):
pass
def _init(self):
self.extractor.initialize()
self.pred_url = self._prepare_predicates(
@@ -596,7 +599,7 @@ class DownloadJob(Job):
return instance
def initialize(self, kwdict=None):
"""Delayed initialization of PathFormat, etc."""
"""initialize PathFormat, postprocessors, archive, options, etc"""
extr = self.extractor
cfg = extr.config