Skip to content

Commit 7e37627

Browse files
author
Andrei Neagu
committed
all processes can be missing
1 parent ab79e20 commit 7e37627

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/service-library/tests/deferred_tasks/test_deferred_tasks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ async def stop(self, *, graceful: bool = False):
6464
parent = psutil.Process(self.pid)
6565
children = parent.children(recursive=True)
6666
for child_pid in [child.pid for child in children]:
67-
psutil.Process(child_pid).kill()
67+
with suppress(psutil.NoSuchProcess):
68+
psutil.Process(child_pid).kill()
6869

6970
self.process = None
7071
self.pid = None

0 commit comments

Comments
 (0)