diff options
author | John Estabrook <jestabro@vyos.io> | 2025-03-20 09:17:29 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-20 09:17:29 -0500 |
commit | 39364b6a9f8c385b805ad01b0c14b313b29426be (patch) | |
tree | c3cbc1954dc3ce67ad06ca161559332eae56d280 | |
parent | 78a3ba7039e8ad9be8ca1960ecc5dac9a985fb0e (diff) | |
parent | 6dd7dbc2500d8f5c662389ababefaf0ab2669fe9 (diff) | |
download | vyos-1x-39364b6a9f8c385b805ad01b0c14b313b29426be.tar.gz vyos-1x-39364b6a9f8c385b805ad01b0c14b313b29426be.zip |
Merge pull request #4406 from jestabro/relax-lexer
T7246: do not pass unneeded version string to parser
-rw-r--r-- | python/vyos/configtree.py | 2 | ||||
-rw-r--r-- | tests/data/config.valid | 4 |
2 files changed, 3 insertions, 3 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): diff --git a/tests/data/config.valid b/tests/data/config.valid index 1fbdd1505..0836bf60b 100644 --- a/tests/data/config.valid +++ b/tests/data/config.valid @@ -35,5 +35,5 @@ empty-node { trailing-leaf-node-without-value -// Trailing comment -// Another trailing comment +// some version string info +// continued |