From: Olivier Matz Date: Wed, 25 Nov 2015 17:54:18 +0000 (+0100) Subject: conditions: fix criteria for 'or' X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=638e4336394ed3de3c54f249377c4ed61dc1ac0e;p=imapami.git conditions: fix criteria for 'or' The criteria was wrongly set to None as the following code has no return value: criteria = set().add(criteria) We should do this instead: criteria = set([criteria]) Signed-off-by: Olivier Matz --- diff --git a/imapami/conditions.py b/imapami/conditions.py index 57014d9..4d06e88 100644 --- a/imapami/conditions.py +++ b/imapami/conditions.py @@ -676,7 +676,7 @@ class ImapamiCondOr(ImapamiCond): else: criteria = 'OR (%s) (%s)' % (criteria, crit) if criteria != '': - criteria = set().add(criteria) + criteria = set([criteria]) fetch = imapami.utils.highest_fetch_level( [c.fetch for c in cond_list]) ImapamiCond.__init__(self, fetch=fetch, criteria=criteria)