Skip to content

Commit

Permalink
Add destructor to wait for process termination
Browse files Browse the repository at this point in the history
This commit adds a destructor to wait for a process termination in
`ReturnCodeToSubunit` class. This commit fixes mtreinish#320 partially.
  • Loading branch information
masayukig committed Apr 14, 2022
1 parent 3b5803c commit da0a011
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions stestr/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ def __init__(self, process):
self.source = self.proc.stdout
self.lastoutput = bytes((b'\n')[0])

def __del__(self):
self.proc.wait()

def _append_return_code_as_test(self):
if self.done is True:
return
Expand Down

0 comments on commit da0a011

Please sign in to comment.