From 272659110cd0569bc85026316d8fcbdafa6c1a99 Mon Sep 17 00:00:00 2001 From: funilrys Date: Sun, 3 Sep 2023 15:11:00 +0200 Subject: [PATCH] Fix logical issue. --- updateHostsFile.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/updateHostsFile.py b/updateHostsFile.py index d56b1d721..db3f3fb98 100755 --- a/updateHostsFile.py +++ b/updateHostsFile.py @@ -1126,7 +1126,8 @@ def normalize_rule(rule, target_ip, keep_domain_comments): if ( is_ip(hostname) or re.search(static_ip_regex, hostname) - or ("." not in hostname and ":" not in hostname) + or "." not in hostname + or ":" in hostname ): # Example: 0.0.0.0 127.0.0.1