From 638e4336394ed3de3c54f249377c4ed61dc1ac0e Mon Sep 17 00:00:00 2001 From: Olivier Matz Date: Wed, 25 Nov 2015 18:54:18 +0100 Subject: [PATCH] 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 --- imapami/conditions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.39.5