提交 998f6c1f 编写于 作者: B Beau Hastings

Fix cpu_stats TypeError

Signed-off-by: NBeau Hastings <beausy@gmail.com>
上级 85fa23ab
......@@ -136,7 +136,8 @@ class Plugin(GlancesPlugin):
self.cpu_stats_old = cpu_stats
else:
for stat in cpu_stats._fields:
self.stats[stat] = getattr(cpu_stats, stat) - getattr(self.cpu_stats_old, stat)
if getattr(cpu_stats, stat) is not None:
self.stats[stat] = getattr(cpu_stats, stat) - getattr(self.cpu_stats_old, stat)
self.stats['time_since_update'] = time_since_update
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册