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): ...@@ -91,21 +91,24 @@ class AdvancedSearchTextDetector(lexer):
def __call__(self, input, is_column): def __call__(self, input, is_column):
self.isColumn = is_column self.isColumn = is_column
self.found = False try:
check_grammar = False self.found = False
self.token_list = token_list = [] check_grammar = False
append = token_list.append self.token_list = token_list = []
self.input(input) append = token_list.append
while not self.found: self.input(input)
token = self.real_token() while not self.found:
append(token) token = self.real_token()
if token is None: append(token)
break if token is None:
if token.type == 'OPERATOR': break
check_grammar = True if token.type == 'OPERATOR':
if not self.found and check_grammar: check_grammar = True
self.found = self.parse() if not self.found and check_grammar:
return self.found self.found = self.parse()
return self.found
finally:
self.isColumn = None
update_docstrings(AdvancedSearchTextDetector) 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