Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
phi-friday committed Mar 1, 2024
1 parent 2c64f88 commit 7c4da60
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/timeout_executor/terminate.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ def close(self, name: str | None = None) -> None:
logger.debug("%r try to terminate process from %s", self, name or "unknown")
process = self.callback_args.process
if process.returncode is None:
process.terminate()
self.is_active = True
with suppress(ProcessLookupError):
process.terminate()
self.is_active = True

if process.stdout is not None:
text = process.stdout.read()
Expand Down

0 comments on commit 7c4da60

Please sign in to comment.