Skip to content

Commit 39364b6

Browse files
authored
Merge pull request #4406 from jestabro/relax-lexer
T7246: do not pass unneeded version string to parser
2 parents 78a3ba7 + 6dd7dbc commit 39364b6

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

python/vyos/configtree.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ def unescape_backslash(string: str) -> str:
5050
def extract_version(s):
5151
"""Extract the version string from the config string"""
5252
t = re.split('(^//)', s, maxsplit=1, flags=re.MULTILINE)
53-
return (s, ''.join(t[1:]))
53+
return (t[0], ''.join(t[1:]))
5454

5555

5656
def check_path(path):

tests/data/config.valid

+2-2
Original file line numberDiff line numberDiff line change
@@ -35,5 +35,5 @@ empty-node {
3535

3636
trailing-leaf-node-without-value
3737

38-
// Trailing comment
39-
// Another trailing comment
38+
// some version string info
39+
// continued

0 commit comments

Comments
 (0)