From e5cdce4e7d6b9b73528237346f43b5fe3b8bfd01 Mon Sep 17 00:00:00 2001 From: Natanael Arndt Date: Wed, 26 Jul 2023 15:30:31 +0200 Subject: [PATCH] default to an empty dict for the from service if the service is None Signed-off-by: Natanael Arndt --- podman_compose.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/podman_compose.py b/podman_compose.py index ade929a..c510d55 100755 --- a/podman_compose.py +++ b/podman_compose.py @@ -1375,7 +1375,11 @@ def resolve_extends(services, service_names, environ): content = content["services"] subdirectory = os.path.dirname(filename) content = rec_subs(content, environ) - from_service = content.get(from_service_name, {}) + from_service = ( + {} + if content.get(from_service_name, {}) is None + else content.get(from_service_name, {}) + ) normalize_service(from_service, subdirectory) else: from_service = services.get(from_service_name, {}).copy()