From 5b089d0460fbbb2b8166cc9f3ec86f0f03b48989 Mon Sep 17 00:00:00 2001 From: zaowen Date: Sat, 29 Sep 2018 02:00:42 -0600 Subject: [PATCH] Minor requested changes --- qutebrowser/browser/adblock.py | 3 +-- tests/unit/browser/test_adblock.py | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/qutebrowser/browser/adblock.py b/qutebrowser/browser/adblock.py index f807fee19..862ec18fa 100644 --- a/qutebrowser/browser/adblock.py +++ b/qutebrowser/browser/adblock.py @@ -175,8 +175,7 @@ class HostBlocker: filename = url.toLocalFile() if os.path.isdir(filename): for filenames in os.scandir(filename): - if not filenames.name.startswith('.')\ - and filenames.is_file(): + if filenames.is_file(): self._import_local(filenames.path) else: self._import_local(filename) diff --git a/tests/unit/browser/test_adblock.py b/tests/unit/browser/test_adblock.py index f9a695f5b..8bcbf3eb6 100644 --- a/tests/unit/browser/test_adblock.py +++ b/tests/unit/browser/test_adblock.py @@ -452,4 +452,4 @@ def test_add_directory(config_stub, basedir, download_stub, config_stub.val.content.host_blocking.enabled = True host_blocker = adblock.HostBlocker() host_blocker.adblock_update() - assert len(host_blocker._blocked_hosts) == (len(blocklist_hosts2) * 2) + assert len(host_blocker._blocked_hosts) == len(blocklist_hosts2) * 2