提交 ff4cfcd0 编写于 作者: N nicolargo

Processor name getting cut off #1917

上级 ed8cd9f8
......@@ -82,7 +82,7 @@ class CpuPercent(object):
# Get the CPU name once from the /proc/cpuinfo file
# @TODO: Multisystem...
try:
self.cpu_info['cpu_name'] = open('/proc/cpuinfo', 'r').readlines()[4].split(':')[1][1:-2]
self.cpu_info['cpu_name'] = open('/proc/cpuinfo', 'r').readlines()[4].split(':')[1].strip()
except:
self.cpu_info['cpu_name'] = 'CPU'
return self.cpu_info['cpu_name']
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册