diff options
author | John Estabrook <jestabro@vyos.io> | 2023-07-09 17:49:41 -0500 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2023-07-09 17:49:41 -0500 |
commit | 91e94036bf808d36399b698fbcecf4b9836f5806 (patch) | |
tree | 6d287393761ebd22122ae3008ed827c480874573 /python/vyos | |
parent | c17167338fa209238fb8d160cbe59077fe75625b (diff) | |
download | vyos-1x-91e94036bf808d36399b698fbcecf4b9836f5806.tar.gz vyos-1x-91e94036bf808d36399b698fbcecf4b9836f5806.zip |
xml: T5345: remove unneeded, incorrect check on paths
This check can raise a false positive exception in the case of a
tag-node value name equal to the tag-node name; it is unneeded in any
case as the functions are called with well-defined paths, respectively,
with a correct verification.
Diffstat (limited to 'python/vyos')
-rw-r--r-- | python/vyos/xml_ref/definition.py | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/python/vyos/xml_ref/definition.py b/python/vyos/xml_ref/definition.py index 33a49ca69..7634773d6 100644 --- a/python/vyos/xml_ref/definition.py +++ b/python/vyos/xml_ref/definition.py @@ -123,9 +123,6 @@ class Xml: return d def multi_to_list(self, rpath: list, conf: dict) -> dict: - if rpath and rpath[-1] in list(conf): - raise ValueError('rpath should be disjoint from conf keys') - res: Any = {} for k in list(conf): @@ -246,10 +243,6 @@ class Xml: if not conf: return self.get_defaults(path, get_first_key=get_first_key, recursive=recursive) - 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 {} |