Commit 0169d11e authored by Vincent Pelletier's avatar Vincent Pelletier

Unset self.isColumn value before returning: it is a method bound to a...

Unset self.isColumn value before returning: it is a method bound to a persistent object, so it might do bad things.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@26796 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent b23585e9
......@@ -91,21 +91,24 @@ class AdvancedSearchTextDetector(lexer):
def __call__(self, input, is_column):
self.isColumn = is_column
self.found = False
check_grammar = False
self.token_list = token_list = []
append = token_list.append
self.input(input)
while not self.found:
token = self.real_token()
append(token)
if token is None:
break
if token.type == 'OPERATOR':
check_grammar = True
if not self.found and check_grammar:
self.found = self.parse()
return self.found
try:
self.found = False
check_grammar = False
self.token_list = token_list = []
append = token_list.append
self.input(input)
while not self.found:
token = self.real_token()
append(token)
if token is None:
break
if token.type == 'OPERATOR':
check_grammar = True
if not self.found and check_grammar:
self.found = self.parse()
return self.found
finally:
self.isColumn = None
update_docstrings(AdvancedSearchTextDetector)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment