Skip to content

Commit

Permalink
增加windows 实现
Browse files Browse the repository at this point in the history
  • Loading branch information
simonchuzz committed Oct 13, 2023
1 parent 4a4d042 commit 300b01a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pilot/utils/system_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 300b01a

Please sign in to comment.