summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2015-03-23 13:03:10 -0400
committerKali Kaneko <kali@leap.se>2015-03-30 14:48:14 -0400
commit373bbb7552ca6012edeae8bf3b8ee2d75cd5f58f (patch)
tree6f269894504f0c3d17fc394cc16bc612850b3af6 /mail
parent491f65f854736f1f113a288c6021397de0041412 (diff)
[feature] make deferred list error-tolerant
just in case Releases: 0.4.0
Diffstat (limited to 'mail')
-rw-r--r--mail/src/leap/mail/imap/mailbox.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/mail/src/leap/mail/imap/mailbox.py b/mail/src/leap/mail/imap/mailbox.py
index 5d4e597..0eff317 100644
--- a/mail/src/leap/mail/imap/mailbox.py
+++ b/mail/src/leap/mail/imap/mailbox.py
@@ -514,13 +514,14 @@ class IMAPMailbox(object):
d_imapmsg = []
for msg in messages:
d_imapmsg.append(getimapmsg(msg))
- return defer.gatherResults(d_imapmsg)
+ return defer.gatherResults(d_imapmsg, consumeErrors=True)
def _zip_msgid(imap_messages):
zipped = zip(
list(msg_range), imap_messages)
return (item for item in zipped)
+ # XXX not called??
def _unset_recent(sequence):
reactor.callLater(0, self.unset_recent_flags, sequence)
return sequence
@@ -528,12 +529,12 @@ class IMAPMailbox(object):
d_msg = []
for msgid in msg_range:
# XXX We want cdocs because we "probably" are asked for the
- # body. We should be smarted at do_FETCH and pass a parameter
+ # body. We should be smarter at do_FETCH and pass a parameter
# to this method in order not to prefetch cdocs if they're not
# going to be used.
d_msg.append(getmsg(msgid, get_cdocs=True))
- d = defer.gatherResults(d_msg)
+ d = defer.gatherResults(d_msg, consumeErrors=True)
d.addCallback(_get_imap_msg)
d.addCallback(_zip_msgid)
return d