Skip to content

Commit 9b3f423

Browse files
committed
tools/pyboard: Tighten up Pyboard object closure on errors.
Some "device" implementations may be sensitive to this.
1 parent ca81c3a commit 9b3f423

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tools/pyboard.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,13 +300,15 @@ def main():
300300
pyb.enter_raw_repl()
301301
except PyboardError as er:
302302
print(er)
303+
pyb.close()
303304
sys.exit(1)
304305

305306
def execbuffer(buf):
306307
try:
307308
ret, ret_err = pyb.exec_raw(buf, timeout=None, data_consumer=stdout_write_bytes)
308309
except PyboardError as er:
309310
print(er)
311+
pyb.close()
310312
sys.exit(1)
311313
except KeyboardInterrupt:
312314
sys.exit(1)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy