Minor requested changes

This commit is contained in:
zaowen 2018-09-29 02:00:42 -06:00
parent 0680f84ca4
commit 5b089d0460
2 changed files with 2 additions and 3 deletions

View File

@ -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)

View File

@ -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