From a9216c3980233289eb8d26bd514e0803392e3906 Mon Sep 17 00:00:00 2001 From: Simon Li Date: Sat, 5 Oct 2019 21:26:53 +0100 Subject: [PATCH] podman volume inspect mountPoint/Mountpoint podman version 1.6.1 volume inspect outputs Mountpoint instead of mountPoint --- podman_compose.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/podman_compose.py b/podman_compose.py index 2adc889..8c27cfe 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -381,7 +381,10 @@ def mount_dict_vol_to_bind(compose, mount_dict): except subprocess.CalledProcessError: compose.podman.output(["volume", "create", "--label", "io.podman.compose.project={}".format(proj_name), vol_name]) out = compose.podman.output(["volume", "inspect", vol_name]).decode('utf-8') - src = json.loads(out)[0]["mountPoint"] + try: + src = json.loads(out)[0]["mountPoint"] + except KeyError: + src = json.loads(out)[0]["Mountpoint"] ret=dict(mount_dict, type="bind", source=src, _vol=vol_name) bind_prop=ret.get("bind", {}).get("propagation") if not bind_prop: