From 193a64e33e7b6fa636030f99aa940709cb7e1405 Mon Sep 17 00:00:00 2001 From: Thomas S Hatch Date: Tue, 29 Jan 2013 10:16:37 -0700 Subject: [PATCH] Add check for bad not eval in compound matcher --- salt/minion.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/salt/minion.py b/salt/minion.py index b6fb8481c9..90d6c273ed 100644 --- a/salt/minion.py +++ b/salt/minion.py @@ -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