Skip to content

Commit

Permalink
更新 setHosts_Classic.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sinspired authored Dec 7, 2024
1 parent 28b30bd commit b1443e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions setHosts_Classic.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -974,7 +974,7 @@ def write_to_hosts_file(self, new_entries: List[str]):
.replace("+0800", "+08:00")
)

rprint(f"\n[bold yellow]正在更新 hosts 文件...[/bold yellow]")
rprint("\n[bold yellow]正在更新 hosts 文件...[/bold yellow]")

save_hosts_content = [] # 提取新内容文本

Expand Down

0 comments on commit b1443e5

Please sign in to comment.