Add check for bad not eval in compound matcher

This commit is contained in:
Thomas S Hatch 2013-01-29 10:16:37 -07:00
parent cf06b34125
commit 193a64e33e

View File

@ -1132,6 +1132,13 @@ class Matcher(object):
elif match in opers:
# We didn't match a target, so append a boolean operator or
# subexpression
if match == 'not':
if results[-1] == 'and':
pass
elif results[-1] == 'or':
pass
else:
results.append('and')
results.append(match)
else:
# The match is not explicitly defined, evaluate it as a glob