File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -246,7 +246,7 @@ def remove_topic_callback(self, mqtt_topic):
246
246
try :
247
247
del self ._on_message_filtered [mqtt_topic ]
248
248
except KeyError :
249
- raise from KeyError ("MQTT topic callback not added with add_topic_callback." )
249
+ raise KeyError ("MQTT topic callback not added with add_topic_callback." ) from None
250
250
251
251
@property
252
252
def on_message (self ):
@@ -287,7 +287,7 @@ def connect(self, clean_session=True):
287
287
conntype = _the_interface .TLS_MODE
288
288
self ._sock .connect ((self .broker , self .port ), conntype )
289
289
except RuntimeError as e :
290
- raise from MMQTTException ("Invalid broker address defined." , e )
290
+ raise MMQTTException ("Invalid broker address defined." , e ) from None
291
291
else :
292
292
try :
293
293
if self .logger is not None :
@@ -299,7 +299,7 @@ def connect(self, clean_session=True):
299
299
)[0 ]
300
300
self ._sock .connect (addr [- 1 ], _the_interface .TCP_MODE )
301
301
except RuntimeError as e :
302
- raise from MMQTTException ("Invalid broker address defined." , e )
302
+ raise MMQTTException ("Invalid broker address defined." , e ) from None
303
303
304
304
# Fixed Header
305
305
fixed_header = bytearray ([0x10 ])
You can’t perform that action at this time.
0 commit comments