TypeError: string indices must be integers (glances_percpu.py) #1027

pull/1044/head
Nicolargo 2017-02-08 10:04:49 +01:00
parent 17e1c8c674
commit b38372f39e
1 changed files with 5 additions and 1 deletions

View File

@ -84,7 +84,11 @@ class Plugin(GlancesPlugin):
# Total per-CPU usage
for cpu in self.stats:
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