Skip to content

Commit

Permalink
Fix: Do not throw timeout errors with docker kill
Browse files Browse the repository at this point in the history
  • Loading branch information
klieret committed Jan 3, 2025
1 parent 58b555a commit 27bc409
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/swerex/deployment/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ async def stop(self):
stderr=subprocess.DEVNULL,
timeout=10,
)
except subprocess.CalledProcessError:
self.logger.warning(f"Failed to kill container {self._container_name}")
except (subprocess.CalledProcessError, subprocess.TimeoutExpired) as e:
self.logger.warning(f"Failed to kill container {self._container_name}: {e}", exc_info=True)
for _ in range(3):
self._container_process.kill()
try:
Expand Down

0 comments on commit 27bc409

Please sign in to comment.