diff options
Diffstat (limited to 'qutebrowser/components/hostblock.py')
-rw-r--r-- | qutebrowser/components/hostblock.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/qutebrowser/components/hostblock.py b/qutebrowser/components/hostblock.py index 0e7278d1b..2d6086245 100644 --- a/qutebrowser/components/hostblock.py +++ b/qutebrowser/components/hostblock.py @@ -132,12 +132,10 @@ class HostBlocker: host = request_url.host() - for hostname in urlutils.widened_hostnames(host): - if hostname in self._blocked_hosts \ - or hostname in self._config_blocked_hosts: - return True - - return False + return any( + hostname in self._blocked_hosts or hostname in self._config_blocked_hosts + for hostname in urlutils.widened_hostnames(host) + ) def filter_request(self, info: interceptor.Request) -> None: """Block the given request if necessary.""" |