Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

podman pod info: handle return being list in Podman 5 #713

Merged
merged 1 commit into from
Feb 17, 2024

Conversation

AdamWill
Copy link
Contributor

@AdamWill AdamWill commented Feb 16, 2024

Fixes #712

Podman 5 changed the output of podman pod info (when run on a single pod) from being a dict to being a list of dicts:

containers/podman#21514

this should handle both ways. Unfortunately not sure how to add a test for this as I can't see a unit test that mocks the output of the command, only the integration test that gets real live output, and I'm not sure how to get that test run with Podman 5.

Fixes containers#712

Podman 5 changed the output of `podman pod info` (when run on a
single pod) from being a dict to being a list of dicts:

containers/podman#21514

this should handle both ways. Unfortunately not sure how to add
a test for this as I can't see a unit test that mocks the output
of the command, only the integration test that gets real live
output, and I'm not sure how to get that test run with Podman 5.

Signed-off-by: Adam Williamson <[email protected]>
@AdamWill AdamWill force-pushed the podman-5-pod-inspect-array branch from 316dcb4 to bba2d99 Compare February 16, 2024 01:30
@AdamWill
Copy link
Contributor Author

Tested this on my local system and it fixes the crash.

@sshnaidm
Copy link
Member

Thanks for fixing!

@sshnaidm sshnaidm merged commit 7d7445d into containers:master Feb 17, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AttributeError: 'list' object has no attribute 'get' trying to use collection on recent Fedora (podman 5.0?)
2 participants