Commit c625a77
Fix resource leak: wrap p.exitcode assert in try/finally so p.close() always runs
Without try/finally, if `assert p.exitcode == 0` raises AssertionError,
`p.close()` is never called. This leaves the Process object unclosed
and causes `ResourceWarning: process ... not closed` on Python 3.12+.
Co-authored-by: lostmsu <239520+lostmsu@users.noreply.github.com>1 parent ae47f46 commit c625a77
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
158 | | - | |
159 | | - | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
0 commit comments