mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-29 20:21:35 +03:00
Try/catch for issue #356
This commit is contained in:
parent
2c57f019f1
commit
4c78d5f15e
@ -19,7 +19,7 @@
|
||||
|
||||
# Glances informations
|
||||
__appname__ = 'glances'
|
||||
__version__ = '2.0_RC1'
|
||||
__version__ = '2.0_RC2'
|
||||
__author__ = 'Nicolas Hennion <nicolas@nicolargo.com>'
|
||||
__license__ = 'LGPL'
|
||||
|
||||
|
@ -133,7 +133,10 @@ class Plugin(GlancesPlugin):
|
||||
ret.append(self.curse_add_line(msg))
|
||||
msg = "{0:>5}".format(item['value'])
|
||||
if item['type'] == 'battery':
|
||||
ret.append(self.curse_add_line(msg, self.get_alert(100 - item['value'], header=item['type'])))
|
||||
try:
|
||||
ret.append(self.curse_add_line(msg, self.get_alert(100 - item['value'], header=item['type'])))
|
||||
except TypeError:
|
||||
pass
|
||||
else:
|
||||
ret.append(self.curse_add_line(msg, self.get_alert(item['value'], header=item['type'])))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user