Improve error logging in Docker image cleanup

Co-authored-by: bandrel <3598052+bandrel@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-02-01 04:29:09 +00:00
parent 2bddce51a4
commit 0e7db78296
+4 -3
View File
@@ -1,6 +1,7 @@
import os
import shutil
import subprocess
import sys
import uuid
from pathlib import Path
@@ -46,9 +47,9 @@ def docker_image():
text=True,
timeout=60,
)
except Exception:
# Don't fail the test if cleanup fails
pass
except Exception as e:
# Don't fail the test if cleanup fails, but log the issue
print(f"Warning: Failed to remove Docker image {image_tag}: {e}", file=sys.stderr)
def _run_container(image_tag, command, timeout=180):