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:
33bd0df
)
Fix minor logical issue.
author
funilrys
<redacted>
Sun, 3 Sep 2023 11:33:33 +0000
(13:33 +0200)
committer
funilrys
<redacted>
Sun, 3 Sep 2023 11:33:33 +0000
(13:33 +0200)
updateHostsFile.py
patch
|
blob
|
history
diff --git
a/updateHostsFile.py
b/updateHostsFile.py
index 9b82e98c1c2162590bf62ce6c89117be85f48269..d56b1d7212a3ab2d19cd9623041d036b0d399985 100755
(executable)
--- a/
updateHostsFile.py
+++ b/
updateHostsFile.py
@@
-1125,10
+1125,8
@@
def normalize_rule(rule, target_ip, keep_domain_comments):
if (
is_ip(hostname)
- or re.search(static_ip_regex, split_rule[0])
- or "." not in hostname
- or ":" in hostname
- or ""
+ or re.search(static_ip_regex, hostname)
+ or ("." not in hostname and ":" not in hostname)
):
# Example: 0.0.0.0 127.0.0.1
git clone https://git.99rst.org/PROJECT