diff --git a/setHosts_Classic.py b/setHosts_Classic.py index 5cd3382..3517f31 100644 --- a/setHosts_Classic.py +++ b/setHosts_Classic.py @@ -953,9 +953,9 @@ def write_to_hosts_file(self, new_entries: List[str]): # 非标记块内容保留 if ( - not skip and - (line.startswith("#") or not line) and - not any(tag in line for tag in skip_tags) + not skip + and (line.startswith("#") or not line) + and not any(tag in line for tag in skip_tags) ): new_content.append(line) continue