From 60c43d299b7352f7056926e97bbc4c0481f11290 Mon Sep 17 00:00:00 2001 From: Steven Black Date: Fri, 1 Apr 2016 23:49:22 -0400 Subject: [PATCH] =?UTF-8?q?Issue=20#118:=20fix=20=E2=80=93=20resolve=20pro?= =?UTF-8?q?blems=20with=20whitelisting=20domains.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- updateHostsFile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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"]):