mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-29 07:30:58 +03:00
Correct issue on load plugin on Windows OS
This commit is contained in:
parent
722406e83a
commit
c6a47c1ecc
@ -122,10 +122,14 @@ class Plugin(GlancesPlugin):
|
||||
GlancesPlugin.update_views(self)
|
||||
|
||||
# Add specifics informations
|
||||
# Alert and log
|
||||
self.views['min15']['decoration'] = self.get_alert_log(self.stats['min15'], max=100 * self.stats['cpucore'])
|
||||
# Alert only
|
||||
self.views['min5']['decoration'] = self.get_alert(self.stats['min5'], max=100 * self.stats['cpucore'])
|
||||
try:
|
||||
# Alert and log
|
||||
self.views['min15']['decoration'] = self.get_alert_log(self.stats['min15'], max=100 * self.stats['cpucore'])
|
||||
# Alert only
|
||||
self.views['min5']['decoration'] = self.get_alert(self.stats['min5'], max=100 * self.stats['cpucore'])
|
||||
except KeyError:
|
||||
# try/except mandatory for Windows compatibility (no load stats)
|
||||
pass
|
||||
|
||||
def msg_curse(self, args=None):
|
||||
"""Return the dict to display in the curse interface."""
|
||||
|
Loading…
Reference in New Issue
Block a user