mirror of https://github.com/nicolargo/glances
TypeError: string indices must be integers (glances_percpu.py) #1027
parent
17e1c8c674
commit
b38372f39e
|
@ -84,7 +84,11 @@ class Plugin(GlancesPlugin):
|
|||
|
||||
# Total per-CPU usage
|
||||
for cpu in self.stats:
|
||||
msg = '{:>6}%'.format(cpu['total'])
|
||||
try:
|
||||
msg = '{:>6}%'.format(cpu['total'])
|
||||
except TypeError:
|
||||
# TypeError: string indices must be integers (issue #1027)
|
||||
msg = '{:>6}%'.format('?')
|
||||
ret.append(self.curse_add_line(msg))
|
||||
|
||||
# Stats per-CPU
|
||||
|
|
Loading…
Reference in New Issue