diff options
-rw-r--r-- | python/vyos/xml_ref/definition.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/python/vyos/xml_ref/definition.py b/python/vyos/xml_ref/definition.py index 43101bb4e..d95d580e2 100644 --- a/python/vyos/xml_ref/definition.py +++ b/python/vyos/xml_ref/definition.py @@ -272,8 +272,13 @@ class Xml: return self.get_defaults(path, get_first_key=get_first_key, recursive=recursive) if not self._well_defined(path, conf): - print('path to config dict does not define full config paths') - return {} + # adjust for possible overlap: + if path and path[-1] in list(conf): + conf = conf[path[-1]] + conf = {} if not isinstance(conf, dict) else conf + if not self._well_defined(path, conf): + print('path to config dict does not define full config paths') + return {} res = self._relative_defaults(path, conf, recursive=recursive) |