mirror of https://github.com/nicolargo/glances
KeyError: 'cpucore' when exporting data to InfluxDB (issue #729)
parent
b57de62392
commit
f3c7db8fd4
|
@ -139,7 +139,7 @@ class Plugin(GlancesPlugin):
|
||||||
msg = '{0:8}'.format('LOAD')
|
msg = '{0:8}'.format('LOAD')
|
||||||
ret.append(self.curse_add_line(msg, "TITLE"))
|
ret.append(self.curse_add_line(msg, "TITLE"))
|
||||||
# Core number
|
# 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']))
|
msg = '{0}-core'.format(int(self.stats['cpucore']))
|
||||||
ret.append(self.curse_add_line(msg))
|
ret.append(self.curse_add_line(msg))
|
||||||
# New line
|
# New line
|
||||||
|
|
Loading…
Reference in New Issue