Add cpu model for CPU info (Raspberry PI 5)

This commit is contained in:
nicolargo 2024-06-26 18:12:56 +02:00
parent be89ee0025
commit e5d5351d31

View File

@ -73,7 +73,7 @@ class CpuPercent:
pass pass
else: else:
for line in cpuinfo_file: for line in cpuinfo_file:
if line.startswith('model name') or line.startswith('Model'): if line.startswith('model name') or line.startswith('Model') or line.startswith('cpu model'):
ret = line.split(':')[1].strip() ret = line.split(':')[1].strip()
break break
return ret if ret else 'CPU' return ret if ret else 'CPU'