@@ -799,15 +799,21 @@ def subscribe(self, topic, qos=0):
799
799
rc = self ._sock_exact_recv (remaining_len )
800
800
for i in range (0 , remaining_len ):
801
801
if rc [i ] not in [0 , 1 , 2 ]:
802
- raise MMQTTException (f"SUBACK Failure for topic { topics [i ][0 ]} : { hex (rc [i ])} " )
802
+ raise MMQTTException (
803
+ f"SUBACK Failure for topic "
804
+ f"{ topics [i ][0 ]} : { hex (rc [i ])} "
805
+ )
803
806
804
807
for t , q in topics :
805
808
if self .on_subscribe is not None :
806
809
self .on_subscribe (self , self ._user_data , t , q )
807
810
self ._subscribed_topics .append (t )
808
811
return
809
812
else :
810
- raise MMQTTException (f"invalid message received as response to SUBSCRIBE: { hex (op )} " )
813
+ raise MMQTTException (
814
+ f"invalid message received as response to "
815
+ f"SUBSCRIBE: { hex (op )} "
816
+ )
811
817
812
818
def unsubscribe (self , topic ):
813
819
"""Unsubscribes from a MQTT topic.
@@ -863,7 +869,10 @@ def unsubscribe(self, topic):
863
869
self ._subscribed_topics .remove (t )
864
870
return
865
871
else :
866
- raise MMQTTException (f"invalid message received as response to UNSUBSCRIBE: { hex (op )} " )
872
+ raise MMQTTException (
873
+ f"invalid message received as response to "
874
+ f"UNSUBSCRIBE: { hex (op )} "
875
+ )
867
876
868
877
def _recompute_reconnect_backoff (self ):
869
878
"""
0 commit comments