mirror of
https://github.com/nicolargo/glances.git
synced 2024-11-24 05:15:47 +03:00
Correct lint error in MQTT exporter
This commit is contained in:
parent
11bd5575ca
commit
dce2f6a5f6
@ -92,7 +92,10 @@ class Export(GlancesExport):
|
||||
for sensor, value in zip(columns, points):
|
||||
try:
|
||||
sensor = [whitelisted(name) for name in sensor.split('.')]
|
||||
topic = '/'.join([self.topic, self.hostname, name, *sensor])
|
||||
tobeexport = [self.topic, self.hostname, name]
|
||||
tobeexport.extend(sensor)
|
||||
topic = '/'.join(tobeexport)
|
||||
|
||||
self.client.publish(topic, value)
|
||||
except Exception as e:
|
||||
logger.error("Can not export stats to MQTT server (%s)" % e)
|
||||
|
Loading…
Reference in New Issue
Block a user