Ensure that pid passed to kill_process_tree is int for mypy (#17051)

Signed-off-by: Harry Mellor <19981378+hmellor@users.noreply.github.com>
This commit is contained in:
Harry Mellor
2025-04-23 15:32:26 +01:00
committed by GitHub
parent f7912cba3d
commit 53c0fa1e25

View File

@@ -134,8 +134,8 @@ def shutdown(proc: Process, input_path: str, output_path: str):
proc.terminate()
proc.join(5)
if proc.is_alive():
kill_process_tree(proc.pid)
if proc.is_alive() and (pid := proc.pid) is not None:
kill_process_tree(pid)
# Remove zmq ipc socket files.
ipc_sockets = [output_path, input_path]