From 49d4e76decd2166a602088b622e88b3812b26a68 Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Thu, 6 Feb 2014 10:29:36 -0400 Subject: defend against empty items --- mail/src/leap/mail/imap/soledadstore.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mail/src/leap/mail/imap/soledadstore.py b/mail/src/leap/mail/imap/soledadstore.py index 13f896f..3c0b6f9 100644 --- a/mail/src/leap/mail/imap/soledadstore.py +++ b/mail/src/leap/mail/imap/soledadstore.py @@ -35,7 +35,7 @@ from leap.mail.imap.messageparts import RecentFlagsDoc from leap.mail.imap.fields import fields from leap.mail.imap.interfaces import IMessageStore from leap.mail.messageflow import IMessageConsumer -from leap.mail.utils import first +from leap.mail.utils import first, empty logger = logging.getLogger(__name__) @@ -303,6 +303,8 @@ class SoledadStore(ContentDedup): """ failed = False for item, call in items: + if empty(item): + continue try: self._try_call(call, item) except Exception as exc: -- cgit v1.2.3