def unsubscribe(self, topic):
"""Unsubscribe from a topic."""
if not topic:
print("Topic must be specified")
else:
(result, msg_id) = self._mqttclient.unsubscribe(topic)
print("...msg_id={!r}, result={} ({})".format(msg_id, result, mqtt.error_string(result)))
if result == mqtt.MQTT_ERR_SUCCESS:
self._discard_sub(topic)
mqtt_client_shell.py 文件源码
python
阅读 19
收藏 0
点赞 0
评论 0
评论列表
文章目录