diff options
author | John Estabrook <jestabro@vyos.io> | 2024-10-07 15:35:06 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-07 15:35:06 -0500 |
commit | 7d4264365e487d37115cff0633b25e4b2012a126 (patch) | |
tree | c2f8dcc7534cb8ce57cf41674905a60ad26da415 /python/vyos/configtree.py | |
parent | 1efb1105f2be65c1126b8f90222306591b8484f7 (diff) | |
parent | d979117ff9988a2633471202b8be8ca4a0d1a923 (diff) | |
download | vyos-1x-7d4264365e487d37115cff0633b25e4b2012a126.tar.gz vyos-1x-7d4264365e487d37115cff0633b25e4b2012a126.zip |
Merge pull request #4138 from natali-rs1985/T4318-current
vyos.configtree: T4318: Allow set tag flag to true or false
Diffstat (limited to 'python/vyos/configtree.py')
-rw-r--r-- | python/vyos/configtree.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/python/vyos/configtree.py b/python/vyos/configtree.py index ee8ca8b83..3e02fbba6 100644 --- a/python/vyos/configtree.py +++ b/python/vyos/configtree.py @@ -141,7 +141,7 @@ class ConfigTree(object): self.__is_tag.restype = c_int self.__set_tag = self.__lib.set_tag - self.__set_tag.argtypes = [c_void_p, c_char_p] + self.__set_tag.argtypes = [c_void_p, c_char_p, c_bool] self.__set_tag.restype = c_int self.__is_leaf = self.__lib.is_leaf @@ -359,11 +359,11 @@ class ConfigTree(object): else: return False - def set_tag(self, path): + def set_tag(self, path, value=True): check_path(path) path_str = " ".join(map(str, path)).encode() - res = self.__set_tag(self.__config, path_str) + res = self.__set_tag(self.__config, path_str, value) if (res == 0): return True else: |