Glances PerCPU issues with Curses UI on Android (issue #1071)

This commit is contained in:
nicolargo 2017-03-28 21:20:59 +02:00
parent ceba55d7b6
commit 42bc667c3f
2 changed files with 5 additions and 3 deletions

4
NEWS
View File

@ -5,7 +5,9 @@ Glances Version 2
Version 2.9.1
=============
...
Bugs corrected:
* Glances PerCPU issues with Curses UI on Android (issue #1071)
Version 2.9.0
=============

View File

@ -85,7 +85,7 @@ class Plugin(GlancesPlugin):
# Total per-CPU usage
for cpu in self.stats:
try:
msg = '{:>6}%'.format(cpu['total'])
msg = '{:6.1f}%'.format(cpu['total'])
except TypeError:
# TypeError: string indices must be integers (issue #1027)
msg = '{:>6}%'.format('?')
@ -101,7 +101,7 @@ class Plugin(GlancesPlugin):
ret.append(self.curse_add_line(msg))
for cpu in self.stats:
try:
msg = '{:>6}%'.format(cpu[stat])
msg = '{:6.1f}%'.format(cpu[stat])
except TypeError:
# TypeError: string indices must be integers (issue #1027)
msg = '{:>6}%'.format('?')