fix recursive merge

This commit is contained in:
Luca Bilke 2025-01-22 18:48:49 +01:00
parent 191b4a7a74
commit ef913fe57c
Signed by: luca
GPG key ID: F6E11C9BAA7C82F5
2 changed files with 3 additions and 5 deletions
galaxy.yml
plugins/module_utils

View file

@ -2,7 +2,7 @@ namespace: snailed
name: ez_docker
version: 3.0.1
version: 3.0.2
readme: README.md

View file

@ -3,7 +3,6 @@
from __future__ import annotations
import contextlib
import copy
from dataclasses import replace
from pathlib import Path
@ -34,9 +33,8 @@ def recursive_update(
elif isinstance(v, list):
v = cast(list[Any], v)
old = cast(list[Any], (default.get(k, [])))
if "_ezd_no_defaults" in old:
with contextlib.suppress(ValueError):
old.remove("_ezd_no_defaults")
if "_ezd_no_defaults" in v:
v.remove("_ezd_no_defaults")
default[k] = v
else:
old.extend(v)