Skip to content

Commit

Permalink
backporting UnicodeDecodeError protection
Browse files Browse the repository at this point in the history
Signed-off-by: Samuel Progin <[email protected]>
  • Loading branch information
Arduous committed Aug 31, 2018
1 parent 969070c commit 4ed72fb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion noisy.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ def _is_blacklisted(self, url):
:param url: full URL
:return: boolean indicating whether a URL is blacklisted or not
"""
return any(blacklisted_url in url for blacklisted_url in self._config["blacklisted_urls"])
try:
return any(blacklisted_url in url for blacklisted_url in self._config["blacklisted_urls"])
except UnicodeDecodeError:
return True

def _should_accept_url(self, url):
"""
Expand Down

0 comments on commit 4ed72fb

Please sign in to comment.