diff --git a/plugins/modules/podman_image.py b/plugins/modules/podman_image.py index 570417b..b7a9f10 100644 --- a/plugins/modules/podman_image.py +++ b/plugins/modules/podman_image.py @@ -524,8 +524,9 @@ class PodmanImageManager(object): image_name = self.image_name args = ['image', 'ls', image_name, '--format', 'json'] rc, images, err = self._run(args, ignore_errors=True) + images = json.loads(images) if len(images) > 0: - return json.loads(images) + return images else: return None @@ -547,8 +548,9 @@ class PodmanImageManager(object): image_name = self.image_name args = ['inspect', image_name, '--format', 'json'] rc, image_data, err = self._run(args) + image_data = json.loads(image_data) if len(image_data) > 0: - return json.loads(image_data) + return image_data else: return None