mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-24 13:23:12 +03:00
KeyError: 'cpucore' when exporting data to InfluxDB (issue #729)
This commit is contained in:
parent
b57de62392
commit
f3c7db8fd4
@ -139,7 +139,7 @@ class Plugin(GlancesPlugin):
|
||||
msg = '{0:8}'.format('LOAD')
|
||||
ret.append(self.curse_add_line(msg, "TITLE"))
|
||||
# Core number
|
||||
if self.stats['cpucore'] > 0:
|
||||
if 'cpucore' in self.stats and self.stats['cpucore'] > 0:
|
||||
msg = '{0}-core'.format(int(self.stats['cpucore']))
|
||||
ret.append(self.curse_add_line(msg))
|
||||
# New line
|
||||
|
Loading…
Reference in New Issue
Block a user