2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-26 03:19:48 +00:00

Error if noderange includes too many )

By default, pyparsing consumes only as much of the
input as matches the grammar. Tell it to consume all
of the noderange and error if there's more string than
matches our grammar.
This commit is contained in:
Jarrod Johnson 2021-06-04 14:19:06 -04:00
parent b8ddf149bd
commit 58157b23d7

View File

@ -106,7 +106,7 @@ class NodeRange(object):
self.endpage = None
self.cfm = config
try:
elements = _parser.parseString("(" + noderange + ")").asList()[0]
elements = _parser.parseString("(" + noderange + ")", parseAll=True).asList()[0]
except pp.ParseException as pe:
raise Exception("Invalid syntax")
if noderange[0] in ('<', '>'):