From fafa2dc47d54adce1851f1647e5d4ece8b80031c Mon Sep 17 00:00:00 2001 From: Benedikt Ziemons Date: Sat, 14 Nov 2020 23:35:22 +0100 Subject: [PATCH] Use inspect command's stdout for json.loads --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index b27ec29..6d2aeea 100644 --- a/main.py +++ b/main.py @@ -66,7 +66,8 @@ class PodKeeper: if self.checking.is_set(): self.checking.clear() new_timestamp = datetime.utcnow() - pod_description = json.loads(podman.pod.inspect(self.podname)) + inspect_command = podman.pod.inspect(self.podname) + pod_description = json.loads(inspect_command.stdout) for container in pod_description["Containers"]: if container["State"] != "running": print(f"Container {container['Name']} exited", file=sys.stderr, flush=True)