mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-09-17 23:18:20 +00:00
增加windows 实现
This commit is contained in:
@@ -205,8 +205,12 @@ def get_cpu_info():
|
||||
except:
|
||||
pass
|
||||
elif os_type == OSType.WINDOWS:
|
||||
# TODO
|
||||
raise NotImplementedError
|
||||
try:
|
||||
output = subprocess.check_output('wmic cpu get Name', shell=True).decode("utf-8")
|
||||
lines = output.splitlines()
|
||||
cpu_info = lines[2].split(':')[-1].strip()
|
||||
except:
|
||||
pass
|
||||
|
||||
return os_type, avx_type, cpu_info, distribution
|
||||
|
||||
|
Reference in New Issue
Block a user