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
4343import time
4444from random import randint
4545from micropython import const
46- from .matcher import MQTTMatcher
4746import 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