mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-10 20:52:33 +00:00
增加windows 实现
This commit is contained in:
parent
4a4d042c41
commit
300b01ade0
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user