Use inspect command's stdout for json.loads
This commit is contained in:
parent
3715eae575
commit
fafa2dc47d
3
main.py
3
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)
|
||||
|
|
Loading…
Reference in a new issue