Only the check was inverted, but the criteria should be too.
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
name = "not"
def __init__(self, cond):
cond = new(cond)
name = "not"
def __init__(self, cond):
cond = new(cond)
- ImapamiCond.__init__(self, fetch=cond.fetch, criteria=cond.criteria)
+ criteria = 'NOT (%s)' % (cond.get_criteria())
+ ImapamiCond.__init__(self, fetch=cond.fetch, criteria=criteria)
self.cond = cond
def check(self, ami, mail):
self.cond = cond
def check(self, ami, mail):