Skip to content

Commit dda9157

Browse files
author
brentru
committed
fixup syntax, delete message from on_msg_filtered
1 parent 11e99d9 commit dda9157

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

adafruit_minimqtt/adafruit_minimqtt.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Original Work Copyright (c) 2016 Paul Sokolovsky, uMQTT
66
# Modified Work Copyright (c) 2019 Bradley Beach, esp32spi_mqtt
7-
#
7+
#
88
# Permission is hereby granted, free of charge, to any person obtaining a copy
99
# of this software and associated documentation files (the "Software"), to deal
1010
# in the Software without restriction, including without limitation the rights
@@ -43,8 +43,8 @@
4343
import time
4444
from random import randint
4545
from micropython import const
46-
from .matcher import MQTTMatcher
4746
import adafruit_logging as logging
47+
from .matcher import MQTTMatcher
4848

4949
__version__ = "0.0.0-auto.0"
5050
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT.git"
@@ -238,7 +238,7 @@ def remove_topic_callback(self, mqtt_topic):
238238
"""
239239
if mqtt_topic is None:
240240
raise ValueError("MQTT Topic must be defined.")
241-
pass
241+
del self._on_message_filtered[mqtt_topic]
242242

243243
@property
244244
def on_message(self):
@@ -260,7 +260,7 @@ def _handle_on_message(self, client, topic, message):
260260
callback(client, topic, message) # on_msg with callback
261261
matched = True
262262

263-
if matched == False and self.on_message: # regular on_message
263+
if not matched and self.on_message: # regular on_message
264264
self.on_message(client, topic, message)
265265

266266
# pylint: disable=too-many-branches, too-many-statements, too-many-locals

0 commit comments

Comments
 (0)