summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2025-03-18 11:49:13 -0500
committerJohn Estabrook <jestabro@vyos.io>2025-03-18 11:49:13 -0500
commit6dd7dbc2500d8f5c662389ababefaf0ab2669fe9 (patch)
treec3cbc1954dc3ce67ad06ca161559332eae56d280 /python
parent78a3ba7039e8ad9be8ca1960ecc5dac9a985fb0e (diff)
downloadvyos-1x-6dd7dbc2500d8f5c662389ababefaf0ab2669fe9.tar.gz
vyos-1x-6dd7dbc2500d8f5c662389ababefaf0ab2669fe9.zip
T7246: do not pass unneeded version string to parser
Previously the parser would ignore lines beginning with '//', however this is unnecessarily restrictive. Pass only config information to parser, as the version string is saved separately for reconstruction on render.
Diffstat (limited to 'python')
-rw-r--r--python/vyos/configtree.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/python/vyos/configtree.py b/python/vyos/configtree.py
index 83954327c..dade852c7 100644
--- a/python/vyos/configtree.py
+++ b/python/vyos/configtree.py
@@ -50,7 +50,7 @@ def unescape_backslash(string: str) -> str:
def extract_version(s):
"""Extract the version string from the config string"""
t = re.split('(^//)', s, maxsplit=1, flags=re.MULTILINE)
- return (s, ''.join(t[1:]))
+ return (t[0], ''.join(t[1:]))
def check_path(path):