diff options
author | Damien George <damien@micropython.org> | 2025-07-17 15:27:39 +1000 |
---|---|---|
committer | Damien George <damien@micropython.org> | 2025-07-23 12:42:44 +1000 |
commit | cc774c3daf68f3e2e1e920d7728b3c07cf6da32e (patch) | |
tree | f2fbe63e9120b3c5a9f5d0da1b430d2fcf7d7f4c /tools/pyboard.py | |
parent | b7e734bfb7494e83c7be42ebe222ec1988278f19 (diff) |
tools/pyboard.py: Add timeout argument to Pyboard.exec_/exec.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tools/pyboard.py')
-rwxr-xr-x | tools/pyboard.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/pyboard.py b/tools/pyboard.py index 50ecd33b7..4099de299 100755 --- a/tools/pyboard.py +++ b/tools/pyboard.py @@ -530,8 +530,8 @@ class Pyboard: return ret # In Python3, call as pyboard.exec(), see the setattr call below. - def exec_(self, command, data_consumer=None): - ret, ret_err = self.exec_raw(command, data_consumer=data_consumer) + def exec_(self, command, timeout=10, data_consumer=None): + ret, ret_err = self.exec_raw(command, timeout, data_consumer) if ret_err: raise PyboardError("exception", ret, ret_err) return ret |