4
4
#
5
5
# Original Work Copyright (c) 2016 Paul Sokolovsky, uMQTT
6
6
# Modified Work Copyright (c) 2019 Bradley Beach, esp32spi_mqtt
7
- #
7
+ #
8
8
# Permission is hereby granted, free of charge, to any person obtaining a copy
9
9
# of this software and associated documentation files (the "Software"), to deal
10
10
# in the Software without restriction, including without limitation the rights
43
43
import time
44
44
from random import randint
45
45
from micropython import const
46
- from .matcher import MQTTMatcher
47
46
import adafruit_logging as logging
47
+ from .matcher import MQTTMatcher
48
48
49
49
__version__ = "0.0.0-auto.0"
50
50
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_MiniMQTT.git"
@@ -238,7 +238,7 @@ def remove_topic_callback(self, mqtt_topic):
238
238
"""
239
239
if mqtt_topic is None :
240
240
raise ValueError ("MQTT Topic must be defined." )
241
- pass
241
+ del self . _on_message_filtered [ mqtt_topic ]
242
242
243
243
@property
244
244
def on_message (self ):
@@ -260,7 +260,7 @@ def _handle_on_message(self, client, topic, message):
260
260
callback (client , topic , message ) # on_msg with callback
261
261
matched = True
262
262
263
- if matched == False and self .on_message : # regular on_message
263
+ if not matched and self .on_message : # regular on_message
264
264
self .on_message (client , topic , message )
265
265
266
266
# pylint: disable=too-many-branches, too-many-statements, too-many-locals
0 commit comments