Issue #118: fix – resolve problems with whitelisting domains.
authorSteven Black <redacted>
Sat, 2 Apr 2016 03:49:22 +0000 (23:49 -0400)
committerSteven Black <redacted>
Sat, 2 Apr 2016 03:49:22 +0000 (23:49 -0400)
updateHostsFile.py

index 0bb4b196ecea67a0811f7ec007b007f91df23c28..40a42f102224a69d6a44c669202e5bf9e7486af3 100644 (file)
@@ -292,7 +292,8 @@ def removeDupsAndExcl(mergeFile):
     if os.path.isfile(settings["whitelistfile"]):
         with open(settings["whitelistfile"], "r") as ins:
             for line in ins:
-                if line.rstrip():
+                line = line.strip(" \t\n\r")
+                if line and not line.startswith("#"):
                     settings["exclusions"].append(line)
 
     if not os.path.exists(settings["outputpath"]):
git clone https://git.99rst.org/PROJECT