Skip to content

Commit

Permalink
unregister _kill_process after closing process
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianPugh committed Jan 30, 2023
1 parent fa37bf3 commit 08db9c6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions belay/pyboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,11 @@ def process_output():
# Windows needs more time
time.sleep(5.0)

def cleanup():
_kill_process(subp.pid)

atexit.register(cleanup)
atexit.register(self.close)

def close(self):
_kill_process(self.subp.pid)
atexit.unregister(self.close)

def read(self, size=1):
while len(self.buf) < size:
Expand Down

0 comments on commit 08db9c6

Please sign in to comment.