Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion podman_compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -3667,7 +3667,7 @@ async def compose_down(compose: PodmanCompose, args: argparse.Namespace) -> None
await compose.podman.run([], "rm", [cnt["name"]])

orphaned_images = set()
if args.remove_orphans:
if getattr(args, 'remove_orphans', False):

Copilot AI Feb 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use double quotes for consistency with the rest of this file’s getattr(args, ...) calls (e.g., getattr(args, "timeout", None) a few lines above).

Copilot uses AI. Check for mistakes.

Copilot AI Feb 2, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add test coverage for this regression: compose_down should not raise when args is missing remove_orphans (e.g., an argparse.Namespace constructed without that attribute). This change is user-facing and there are existing unit/integration tests for down, but none cover the missing-attribute scenario.

Copilot uses AI. Check for mistakes.
orphaned_containers = (
(
await compose.podman.output(
Expand Down
Loading