From f65593814b9b7e85bdb8a5651187821c729d41fd Mon Sep 17 00:00:00 2001 From: Stijn Tintel Date: Thu, 7 Dec 2023 22:46:04 +0200 Subject: [PATCH] command_endpoints: fix cb_disconnect in MqttEndpoint The cb_disconnect function lacks the self argument. Silences the following flake8 errors: app/internal/command_endpoints/mqtt.py:95:9: F821 undefined name 'self' app/internal/command_endpoints/mqtt.py:96:9: F821 undefined name 'self' Fixes: 571cf763b0db ("command_endpoints: add connected boolean to MqttEndpoint") --- app/internal/command_endpoints/mqtt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/internal/command_endpoints/mqtt.py b/app/internal/command_endpoints/mqtt.py index 058ebe4..b8c7d4c 100644 --- a/app/internal/command_endpoints/mqtt.py +++ b/app/internal/command_endpoints/mqtt.py @@ -91,7 +91,7 @@ def cb_connect(self, client, userdata, flags, rc): self.log.info("MQTT connected") client.subscribe(self.config.topic) - def cb_disconnect(client, userdata, rc): + def cb_disconnect(self, client, userdata, rc): self.connected = False self.log.info("MQTT disconnected")