From b4351b81930d6ad636ef457950ed0b43930637da Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Wed, 4 Feb 2026 08:49:20 +0100 Subject: [PATCH] [job] more 'is None' checks --- gallery_dl/job.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gallery_dl/job.py b/gallery_dl/job.py index 6e9d3f57..51b32da2 100644 --- a/gallery_dl/job.py +++ b/gallery_dl/job.py @@ -112,7 +112,9 @@ class Job(): extr = self.extractor cfgpath = [] - if parent: + if parent is None: + self.parents = () + else: pextr = parent.extractor if extr.category == pextr.category or \ extr.category in parent.parents: @@ -133,8 +135,6 @@ class Job(): cfgpath.append((cat, sub)) cfgpath.append((category + ">*", sub)) cfgpath.append((extr.category, sub)) - else: - self.parents = () if extr.basecategory: if not cfgpath: @@ -337,7 +337,7 @@ class DownloadJob(Job): self.hooks = () self.downloaders = {} self.out = output.select() - self.visited = parent.visited if parent else set() + self.visited = set() if parent is None else parent.visited self._extractor_filter = None self._skipcnt = 0