WithOUT this patch, if a user (by accident) provides an empty exclude-operators in the configuration then applies command cr-filter-operators, it will results in that ALL operators to be skipped, while it should not skip any operators.
It's easy to check & confirm this bug:
import re
exclude_operators = []
re_exclude_operators = re.compile('|'.join('(:?%s)' % e for e in exclude_operators))
assert re_exclude_operators.match("abc")
assert re_exclude_operators.match("xyz")
WithOUT this patch, if a user (by accident) provides an empty
exclude-operators
in the configuration then applies commandcr-filter-operators
, it will results in that ALL operators to be skipped, while it should not skip any operators.It's easy to check & confirm this bug:
Tests are updated/added.