Skip to content

Commit

Permalink
command_endpoints: fix cb_disconnect in MqttEndpoint
Browse files Browse the repository at this point in the history
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: 571cf76 ("command_endpoints: add connected boolean to MqttEndpoint")
  • Loading branch information
stintel committed Dec 7, 2023
1 parent 29c014a commit 19e4066
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/internal/command_endpoints/mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit 19e4066

Please sign in to comment.