From a1be5ce6b3f8b16fd4096117fe580a5b11e88015 Mon Sep 17 00:00:00 2001 From: Muayyad alsadi Date: Fri, 31 Dec 2021 00:06:48 +0200 Subject: [PATCH] add fallback to get --- podman_compose.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/podman_compose.py b/podman_compose.py index f363bb8..7962b85 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -303,10 +303,10 @@ def assert_volume(compose, mount_dict): ] for item in norm_as_list(labels): args.extend(["--label", item]) - driver = vol.get("driver") + driver = vol.get("driver", None) if driver: args.extend(["--driver", driver]) - driver_opts = vol.get("driver_opts", {}) + driver_opts = vol.get("driver_opts", None) or {} for opt, value in driver_opts.items(): args.extend(["--opt", "{opt}={value}".format(opt=opt, value=value)]) args.append(vol_name)