git.99rst.org
/
stevenblack-hosts.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
| inline |
side by side
(parent:
febbd3e
)
Explicitly lowercase hostname to prevent mixed-case duplicates.
author
qqo
<redacted>
Fri, 23 Oct 2015 21:58:12 +0000
(
00:58
+0300)
committer
qqo
<redacted>
Fri, 23 Oct 2015 21:58:12 +0000
(
00:58
+0300)
updateHostsFile.py
patch
|
blob
|
history
diff --git
a/updateHostsFile.py
b/updateHostsFile.py
index e153d71b6029f32a0ab7fef14e6fd475480c6094..2108a4f783ce0a4eb42940fbf9dfca86ceda31a1 100755
(executable)
--- 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
git clone https://git.99rst.org/PROJECT