diff --git a/server_status/api.py b/server_status/api.py index e731ad4..642d12b 100644 --- a/server_status/api.py +++ b/server_status/api.py @@ -19,9 +19,9 @@ try: # 找到NAME=和VERSION=的行 for line in os_release.split("\n"): if line.startswith("NAME="): - os_name = line.split("=")[1] + os_name = line.split("=")[1].replace('"', '') elif line.startswith("VERSION="): - os_version = line.split("=")[1] + os_version = line.split("=")[1].replace('"', '') except FileNotFoundError: os_name = platform.system() os_version = platform.release()