Skip to content

Commit

Permalink
added default topic,qos to self.topics
Browse files Browse the repository at this point in the history
  • Loading branch information
Sohaib90 committed Jan 19, 2023
1 parent 9d6c2e9 commit 60df092
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flask_mqtt/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,8 @@ def subscribe(self, topic, qos: int = 0) -> Tuple[int, int]:
elif isinstance(topic, list):
for t, q in topic:
self.topics[t] = TopicQos(topic=t, qos=q)
else:
self.topics[topic] = TopicQos(topic=topic, qos=qos)
logger.debug("Subscribed to topic: {0}, qos: {1}".format(topic, qos))
else:
logger.error("Error {0} subscribing to topic: {1}".format(result, topic))
Expand Down

0 comments on commit 60df092

Please sign in to comment.