From: Olivier Matz Date: Wed, 25 Nov 2015 17:53:24 +0000 (+0100) Subject: conditions: fix criteria for 'not' X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=3938d3959383b313acb6cf09d551b7bf49d525b1;p=imapami.git conditions: fix criteria for 'not' Only the check was inverted, but the criteria should be too. Signed-off-by: Olivier Matz --- diff --git a/imapami/conditions.py b/imapami/conditions.py index 97675a7..57014d9 100644 --- a/imapami/conditions.py +++ b/imapami/conditions.py @@ -128,7 +128,8 @@ class ImapamiCondNot(ImapamiCond): 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):