mirror of
https://github.com/StevenBlack/hosts.git
synced 2024-07-04 03:26:12 +02:00
Issue #57: fix - ignore blank lines in the whitelist.
This commit is contained in:
parent
5c98a08d41
commit
ffc17dd7fa
|
@ -261,7 +261,8 @@ def removeDupsAndExcl(mergeFile):
|
|||
if os.path.isfile(WHITELIST_FILE):
|
||||
with open(WHITELIST_FILE, "r") as ins:
|
||||
for line in ins:
|
||||
EXCLUSIONS.append(line)
|
||||
if line.rstrip():
|
||||
EXCLUSIONS.append(line)
|
||||
|
||||
# Another mode is required to read and write the file in Python 3
|
||||
finalFile = open(os.path.join(BASEDIR_PATH, 'hosts'), 'r+b')
|
||||
|
|
Loading…
Reference in New Issue
Block a user