From fed5590f26a5426591bb6d2f2ea8cbc9c59b7699 Mon Sep 17 00:00:00 2001 From: funilrys Date: Sun, 3 Sep 2023 13:33:33 +0200 Subject: [PATCH] Fix minor logical issue. --- updateHostsFile.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/updateHostsFile.py b/updateHostsFile.py index 9b82e98c1..d56b1d721 100755 --- 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