allow blacklist/whitelist to be empty lists/strings (#1051)

This commit is contained in:
Mike Fährmann 2020-10-08 14:55:21 +02:00
parent 3ebb174f2c
commit fd20093c96
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -453,7 +453,7 @@ class DownloadJob(Job):
def _build_blacklist(self):
wlist = self.extractor.config("whitelist")
if wlist:
if wlist is not None:
if isinstance(wlist, str):
wlist = wlist.split(",")
blist = {e.category for e in extractor._list_classes()}
@ -461,7 +461,7 @@ class DownloadJob(Job):
return blist
blist = self.extractor.config("blacklist")
if blist:
if blist is not None:
if isinstance(blist, str):
blist = blist.split(",")
blist = set(blist)