From 52fb25ba4f875135bb9ca8ee6df754ca55a3a6db Mon Sep 17 00:00:00 2001 From: Thomas Mangin Date: Thu, 25 Jun 2020 18:41:12 +0100 Subject: xml: T2528: fix defaults --- python/vyos/xml/definition.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'python') diff --git a/python/vyos/xml/definition.py b/python/vyos/xml/definition.py index 52cbbaf97..a66170a18 100644 --- a/python/vyos/xml/definition.py +++ b/python/vyos/xml/definition.py @@ -290,17 +290,17 @@ class XML(dict): spath.pop(0) return tree - def _get(self, lpath, tag): - return self._tree(lpath + [tag]) + def _get(self, lpath, tag, with_tag=True): + return self._tree(lpath + [tag], with_tag) - def is_multi(self, lpath): - return self._get(lpath, kw.multi) is True + def is_multi(self, lpath, with_tag=True): + return self._get(lpath, kw.multi, with_tag) is True - def is_tag(self, lpath): - return self._get(lpath, kw.node) == kw.tagNode + def is_tag(self, lpath, with_tag=True): + return self._get(lpath, kw.node, with_tag) == kw.tagNode - def is_leaf(self, lpath): - return self._get(lpath, kw.node) == kw.leafNode + def is_leaf(self, lpath, with_tag=True): + return self._get(lpath, kw.node, with_tag) == kw.leafNode - def exists(self, lpath): - return self._get(lpath, kw.node) is not None + def exists(self, lpath, with_tag=True): + return self._get(lpath, kw.node, with_tag) is not None -- cgit v1.2.3