git.99rst.org
/
stevenblack-hosts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
5c98a08
)
Issue #57: fix - ignore blank lines in the whitelist.
author
Steven Black
<redacted>
Tue, 23 Feb 2016 02:48:02 +0000
(21:48 -0500)
committer
Steven Black
<redacted>
Tue, 23 Feb 2016 02:48:02 +0000
(21:48 -0500)
updateHostsFile.py
patch
|
blob
|
history
diff --git
a/updateHostsFile.py
b/updateHostsFile.py
index 4d57bf724d1ed6f1e189f51a035f0a2066b0aef1..5fb711228ca7ef1139212fdfd4dd6d8a197293a2 100644
(file)
--- a/
updateHostsFile.py
+++ b/
updateHostsFile.py
@@
-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')
git clone https://git.99rst.org/PROJECT