提交 0019d402 编写于 作者: M Moisés Guimarães

passing tuples directly to functions using named params.

Signed-off-by: NMoisés Guimarães <guimaraes.moises@gmail.com>
上级 6884021c
......@@ -31,7 +31,7 @@ def _do_publish(client):
if isinstance(message, dict):
client.publish(**message)
elif isinstance(message, tuple):
client.publish(message[0], message[1], message[2], message[3])
client.publish(*message)
else:
raise ValueError('message must be a dict or a tuple')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册