From 9160e7c4b4dd03f588a0d96db4c2abec4ada3798 Mon Sep 17 00:00:00 2001 From: snowykami Date: Sun, 6 Oct 2024 04:35:07 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20=E4=BF=AE=E5=A4=8D=E9=83=A8?= =?UTF-8?q?=E5=88=86linux=E8=8E=B7=E5=8F=96=E5=8F=91=E8=A1=8C=E7=89=88?= =?UTF-8?q?=E9=94=99=E8=AF=AF=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server_status/api.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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()