From 300b01ade07e07055a671a986fb30bb9747ceb7e Mon Sep 17 00:00:00 2001 From: simonchuzz <576639857@qq.com> Date: Fri, 13 Oct 2023 22:15:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0windows=20=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pilot/utils/system_utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pilot/utils/system_utils.py b/pilot/utils/system_utils.py index 2a9494796..50b54be0d 100644 --- a/pilot/utils/system_utils.py +++ b/pilot/utils/system_utils.py @@ -206,9 +206,11 @@ def get_cpu_info(): pass elif os_type == OSType.WINDOWS: try: - output = subprocess.check_output('wmic cpu get Name', shell=True).decode("utf-8") + output = subprocess.check_output("wmic cpu get Name", shell=True).decode( + "utf-8" + ) lines = output.splitlines() - cpu_info = lines[2].split(':')[-1].strip() + cpu_info = lines[2].split(":")[-1].strip() except: pass