tools/pyboard.py: Add timeout argument to Pyboard.exec_/exec.
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
parent
b7e734bfb7
commit
cc774c3daf
1 changed files with 2 additions and 2 deletions
|
|
@ -530,8 +530,8 @@ class Pyboard:
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
# In Python3, call as pyboard.exec(), see the setattr call below.
|
# In Python3, call as pyboard.exec(), see the setattr call below.
|
||||||
def exec_(self, command, data_consumer=None):
|
def exec_(self, command, timeout=10, data_consumer=None):
|
||||||
ret, ret_err = self.exec_raw(command, data_consumer=data_consumer)
|
ret, ret_err = self.exec_raw(command, timeout, data_consumer)
|
||||||
if ret_err:
|
if ret_err:
|
||||||
raise PyboardError("exception", ret, ret_err)
|
raise PyboardError("exception", ret, ret_err)
|
||||||
return ret
|
return ret
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue