From 6dd7dbc2500d8f5c662389ababefaf0ab2669fe9 Mon Sep 17 00:00:00 2001 From: John Estabrook Date: Tue, 18 Mar 2025 11:49:13 -0500 Subject: 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. --- python/vyos/configtree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'python') 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): -- cgit v1.2.3