diff options
| author | Daniil Baturin <daniil@vyos.io> | 2026-09-10 15:44:08 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-10 15:44:08 +0100 |
| commit | 40ec47ec75373717c7847ae1a6b545250fb4967c (patch) | |
| tree | a231d91c1b88ec13c50e9cae15bf27699c89c922 /python | |
| parent | 6441ff0be6c08ffe94f9ab32900273c4d0e4785a (diff) | |
| parent | 3231d1062d0930a9344dd8550243331696ca27eb (diff) | |
| download | vyos-1x-40ec47ec75373717c7847ae1a6b545250fb4967c.tar.gz vyos-1x-40ec47ec75373717c7847ae1a6b545250fb4967c.zip | |
Merge pull request #5456 from c-po/containerlab-fixes
T9269: fix container boot failures and two config diffing regressions they exposed
Diffstat (limited to 'python')
| -rw-r--r-- | python/vyos/utils/dict.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/python/vyos/utils/dict.py b/python/vyos/utils/dict.py index 3fcda902f..058717265 100644 --- a/python/vyos/utils/dict.py +++ b/python/vyos/utils/dict.py @@ -315,7 +315,12 @@ def dict_to_key_paths(d: dict) -> list: """ def func(d, path): if isinstance(d, dict): - if not d: + # An empty dict is a valueless leaf node and yields the path that + # leads to it - but only if there is one. An empty dict at the top + # level means "no configuration at all", which must yield nothing + # instead of a single empty path: consumers join the components + # into a dotted option name, and '' is not an option + if not d and path: yield path for k, v in d.items(): for r in func(v, path + [k]): |
