summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGithub GPG acces <erdnaxela02@hotmail.fr>2024-03-15 13:12:04 +0100
committerGithub GPG acces <erdnaxela02@hotmail.fr>2024-03-15 13:12:04 +0100
commit2e6bcc075888bd36e1787665bc9d3700cd4a8fc8 (patch)
tree9c71d21d1267e2ea04639a86cfb6cf4d2a5cc93e
parentc591461fdefd87a58fdb4c220d8d3ca4c193081f (diff)
Add CallbackAPIversion for MQTT export
Due to the recent update of paho-mqtt to V2.0.0 which requires API versioning, addition of callback_api_version in paho.Client
-rw-r--r--glances/exports/mqtt/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/glances/exports/mqtt/__init__.py b/glances/exports/mqtt/__init__.py
index 9055fa6f..f29bd1b8 100644
--- a/glances/exports/mqtt/__init__.py
+++ b/glances/exports/mqtt/__init__.py
@@ -65,7 +65,7 @@ class Export(GlancesExport):
if not self.export_enable:
return None
try:
- client = paho.Client(client_id='glances_' + self.hostname, clean_session=False)
+ client = paho.Client(callback_api_version=2, client_id='glances_' + self.hostname, clean_session=False)
client.username_pw_set(username=self.user, password=self.password)
if self.tls:
client.tls_set(certifi.where())