Check for soup body in `remove_site_blocks` (#651)

Fixes error with `remove_site_blocks` in the Images tab
main
DUO Labs 2022-02-11 16:42:11 -05:00 committed by GitHub
parent c6c9965335
commit 7c5094d37b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -123,7 +123,7 @@ class Filter:
return soup return soup
def remove_site_blocks(self, soup) -> None: def remove_site_blocks(self, soup) -> None:
if not self.config.block: if not self.config.block or not soup.body:
return return
search_string = ' '.join(['-site:' + search_string = ' '.join(['-site:' +
_ for _ in self.config.block.split(',')]) _ for _ in self.config.block.split(',')])