Issue #57: fix - ignore blank lines in the whitelist.
authorSteven Black <redacted>
Tue, 23 Feb 2016 02:48:02 +0000 (21:48 -0500)
committerSteven Black <redacted>
Tue, 23 Feb 2016 02:48:02 +0000 (21:48 -0500)
updateHostsFile.py

index 4d57bf724d1ed6f1e189f51a035f0a2066b0aef1..5fb711228ca7ef1139212fdfd4dd6d8a197293a2 100644 (file)
@@ -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