Don't terminate a process that isn't alive

This commit is contained in:
Paul O'Leary McCann 2022-12-19 14:43:56 +09:00
parent a4fdec9005
commit 421b23ae5c

View File

@ -385,8 +385,10 @@ def test_autoport(en_vocab):
proc1.terminate()
proc2.terminate()
finally:
proc1.terminate()
proc2.terminate()
if proc1.is_alive():
proc1.terminate()
if proc2.is_alive():
proc2.terminate()
time.sleep(2)
proc1.close()
proc2.close()