Skip to content

Commit

Permalink
F: 完善expect装饰器的参数&返回值说明文档
Browse files Browse the repository at this point in the history
  • Loading branch information
littlemo committed May 6, 2018
1 parent 830e37a commit 1499ea6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions mohand_plugin_expect/hand.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@ def expect(*dargs, **dkwargs):
此处的 ``expect`` 装饰器本身是应该不支持无参数装饰的,但考虑到其作为样例实现,
故将其实现为兼容两种传参的装饰器
:param int log_level: 日志输出等级,默认为: ``logging.INFO``
:param str cmd: 待执行的spawn命令字串
:param int timeout: 动作执行的超时时间
:return: 被封装后的函数
:rtype: function
"""
invoked = bool(len(dargs) == 1 and not dkwargs and callable(dargs[0]))
if invoked:
Expand Down

0 comments on commit 1499ea6

Please sign in to comment.