[job] more 'is None' checks
This commit is contained in:
@@ -112,7 +112,9 @@ class Job():
|
|||||||
extr = self.extractor
|
extr = self.extractor
|
||||||
cfgpath = []
|
cfgpath = []
|
||||||
|
|
||||||
if parent:
|
if parent is None:
|
||||||
|
self.parents = ()
|
||||||
|
else:
|
||||||
pextr = parent.extractor
|
pextr = parent.extractor
|
||||||
if extr.category == pextr.category or \
|
if extr.category == pextr.category or \
|
||||||
extr.category in parent.parents:
|
extr.category in parent.parents:
|
||||||
@@ -133,8 +135,6 @@ class Job():
|
|||||||
cfgpath.append((cat, sub))
|
cfgpath.append((cat, sub))
|
||||||
cfgpath.append((category + ">*", sub))
|
cfgpath.append((category + ">*", sub))
|
||||||
cfgpath.append((extr.category, sub))
|
cfgpath.append((extr.category, sub))
|
||||||
else:
|
|
||||||
self.parents = ()
|
|
||||||
|
|
||||||
if extr.basecategory:
|
if extr.basecategory:
|
||||||
if not cfgpath:
|
if not cfgpath:
|
||||||
@@ -337,7 +337,7 @@ class DownloadJob(Job):
|
|||||||
self.hooks = ()
|
self.hooks = ()
|
||||||
self.downloaders = {}
|
self.downloaders = {}
|
||||||
self.out = output.select()
|
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._extractor_filter = None
|
||||||
self._skipcnt = 0
|
self._skipcnt = 0
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user