From: Steven Black Date: Sat, 2 Apr 2016 03:49:22 +0000 (-0400) Subject: Issue #118: fix – resolve problems with whitelisting domains. X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=60c43d299b7352f7056926e97bbc4c0481f11290;p=stevenblack-hosts.git Issue #118: fix – resolve problems with whitelisting domains. --- diff --git a/updateHostsFile.py b/updateHostsFile.py index 0bb4b196e..40a42f102 100644 --- a/updateHostsFile.py +++ b/updateHostsFile.py @@ -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"]):