提交 03fcf8d9 编写于 作者: R Roger Light

- Raise error on `publish.multiple()` when `msgs` is an empty list.

Closes #684. Thanks to Jinyu Liu.
上级 d0297615
......@@ -4,6 +4,7 @@ v1.6.2 - 2021-xx-xx
- Fix handling of MQTT v5.0 PUBREL messages with remaining length not equal to
2. Closes #696.
- Raise error on `subscribe()` when `topic` is an empty list. Closes #690.
- Raise error on `publish.multiple()` when `msgs` is an empty list. Closes #684.
v1.6.1 - 2021-10-21
......
......@@ -135,6 +135,8 @@ def multiple(msgs, hostname="localhost", port=1883, client_id="", keepalive=60,
if not isinstance(msgs, Iterable):
raise TypeError('msgs must be an iterable')
if len(msgs) == 0:
raise ValueError('msgs is empty')
client = paho.Client(client_id=client_id, userdata=collections.deque(msgs),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册