From: qqo Date: Fri, 23 Oct 2015 21:58:12 +0000 (+0300) Subject: Explicitly lowercase hostname to prevent mixed-case duplicates. X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=d810d251782ad64db31d0f4d18c777e61cabd026;p=stevenblack-hosts.git Explicitly lowercase hostname to prevent mixed-case duplicates. --- diff --git a/updateHostsFile.py b/updateHostsFile.py index e153d71b6..2108a4f78 100755 --- a/updateHostsFile.py +++ b/updateHostsFile.py @@ -188,6 +188,7 @@ def normalizeRule(rule): result = re.search(r'^[ \t]*(\d+\.\d+\.\d+\.\d+)\s+([\w\.-]+)(.*)',rule) if result: target, hostname, suffix = result.groups() + hostname = hostname.lower() # explicitly lowercase hostname return hostname, "%s %s %s\n" % (TARGET_HOST, hostname, suffix) print '==>%s<==' % rule return None, None