Skip to content
Snippets Groups Projects
Commit 9b3f423c authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

tools/pyboard: Tighten up Pyboard object closure on errors.

Some "device" implementations may be sensitive to this.
parent ca81c3ab
Branches
No related tags found
No related merge requests found
......@@ -300,6 +300,7 @@ def main():
pyb.enter_raw_repl()
except PyboardError as er:
print(er)
pyb.close()
sys.exit(1)
def execbuffer(buf):
......@@ -307,6 +308,7 @@ def main():
ret, ret_err = pyb.exec_raw(buf, timeout=None, data_consumer=stdout_write_bytes)
except PyboardError as er:
print(er)
pyb.close()
sys.exit(1)
except KeyboardInterrupt:
sys.exit(1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment