Skip to content

Commit

Permalink
Merge pull request avocado-framework#5974 from ut003460/master
Browse files Browse the repository at this point in the history
 Method modification for obtaining container information
  • Loading branch information
richtja authored Jul 9, 2024
2 parents e236145 + e015b58 commit b796ae7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions avocado/utils/podman.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,11 @@ def get_container_info(self, container_id):
)
except PodmanException as ex:
raise PodmanException(
f"Failed getting information about container:" f" {container_id}."
f"Failed getting information about container: {container_id}."
) from ex
containers = json.loads(stdout.decode())
for container in containers:
if container["Id"] == container_id:
if container.get("Id") == container_id:
return container
return {}

Expand Down

0 comments on commit b796ae7

Please sign in to comment.