Update mw.py

This commit is contained in:
midoks 2023-08-22 17:09:26 +08:00
parent 5755121fa5
commit fb01c68f5a
1 changed files with 2 additions and 2 deletions

View File

@ -1356,8 +1356,8 @@ def getCpuType():
cpuinfo = execShell(cmd)
return cpuinfo[0].strip()
print(getOs())
if getOs() == 'freebsd':
current_os = getOs()
if current_os.startswith('freebsd'):
cmd = "sysctl -a | egrep -i 'hw.model' | awk -F ':' '{print $2}'"
cpuinfo = execShell(cmd)
return cpuinfo[0].strip()