Skip to content

Commit 27bc409

Browse files
committed
Fix: Do not throw timeout errors with docker kill
1 parent 58b555a commit 27bc409

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/swerex/deployment/docker.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,8 +187,8 @@ async def stop(self):
187187
stderr=subprocess.DEVNULL,
188188
timeout=10,
189189
)
190-
except subprocess.CalledProcessError:
191-
self.logger.warning(f"Failed to kill container {self._container_name}")
190+
except (subprocess.CalledProcessError, subprocess.TimeoutExpired) as e:
191+
self.logger.warning(f"Failed to kill container {self._container_name}: {e}", exc_info=True)
192192
for _ in range(3):
193193
self._container_process.kill()
194194
try:

0 commit comments

Comments
 (0)