Skip to content

Commit a853734

Browse files
hmellorwuisawesome
authored andcommitted
Ensure that pid passed to kill_process_tree is int for mypy (vllm-project#17051)
Signed-off-by: Harry Mellor <[email protected]>
1 parent 76b4dee commit a853734

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vllm/v1/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ def shutdown(proc: Process, input_path: str, output_path: str):
134134
proc.terminate()
135135
proc.join(5)
136136

137-
if proc.is_alive():
138-
kill_process_tree(proc.pid)
137+
if proc.is_alive() and (pid := proc.pid) is not None:
138+
kill_process_tree(pid)
139139

140140
# Remove zmq ipc socket files.
141141
ipc_sockets = [output_path, input_path]

0 commit comments

Comments
 (0)