Skip to content

Commit

Permalink
allow blacklist/whitelist to be empty lists/strings (#1051)
Browse files Browse the repository at this point in the history
  • Loading branch information
mikf committed Oct 8, 2020
1 parent 3ebb174 commit fd20093
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gallery_dl/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,15 +453,15 @@ def initialize(self, kwdict=None):

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()}
blist.difference_update(wlist)
return blist

blist = self.extractor.config("blacklist")
if blist:
if blist is not None:
if isinstance(blist, str):
blist = blist.split(",")
blist = set(blist)
Expand Down

0 comments on commit fd20093

Please sign in to comment.