summaryrefslogtreecommitdiff
path: root/src/leap/mail/imap/mailbox.py
diff options
context:
space:
mode:
authorRuben Pollan <meskio@sindominio.net>2015-03-30 22:46:18 +0200
committerRuben Pollan <meskio@sindominio.net>2015-03-30 22:46:18 +0200
commitd64fb189cc7c05272e0558085740efd8df2598dd (patch)
tree7bb82a2ff750c5dd830201a2aa730e29eabf7168 /src/leap/mail/imap/mailbox.py
parent1568761f4fa7a7f8a9b0caec79ed2552b6c73ba7 (diff)
parent8e916eeadfcd76d50b54a2621d789e6a296dcce6 (diff)
Merge branch 'kali/bug/several-mime-fixes' into develop
Diffstat (limited to 'src/leap/mail/imap/mailbox.py')
-rw-r--r--src/leap/mail/imap/mailbox.py32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/leap/mail/imap/mailbox.py b/src/leap/mail/imap/mailbox.py
index 61baca5..1412344 100644
--- a/src/leap/mail/imap/mailbox.py
+++ b/src/leap/mail/imap/mailbox.py
@@ -492,17 +492,12 @@ class IMAPMailbox(object):
:rtype: deferred with a generator that yields...
"""
- # For the moment our UID is sequential, so we
- # can treat them all the same.
- # Change this to the flag that twisted expects when we
- # switch to content-hash based index + local UID table.
-
- is_sequence = True if uid == 0 else False
-
+ # TODO implement sequence
+ # is_sequence = True if uid == 0 else False
# XXX DEBUG --- if you attempt to use the `getmail` utility under
- # imap/tests, it will choke until we implement sequence numbers. This
- # is an easy hack meanwhile.
- # is_sequence = False
+ # imap/tests, or muas like mutt, it will choke until we implement
+ # sequence numbers. This is an easy hack meanwhile.
+ is_sequence = False
# -----------------------------------------------------------------
getmsg = self.collection.get_message_by_uid
@@ -514,13 +509,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 +524,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
@@ -581,7 +577,13 @@ class IMAPMailbox(object):
MessagePart.
:rtype: tuple
"""
- is_sequence = True if uid == 0 else False
+ # is_sequence = True if uid == 0 else False
+ # XXX FIXME -----------------------------------------------------
+ # imap/tests, or muas like mutt, it will choke until we implement
+ # sequence numbers. This is an easy hack meanwhile.
+ is_sequence = False
+ # ---------------------------------------------------------------
+
if is_sequence:
raise NotImplementedError
@@ -664,7 +666,6 @@ class IMAPMailbox(object):
:rtype: tuple
"""
# TODO implement sequences
- # TODO how often is thunderbird doing this?
is_sequence = True if uid == 0 else False
if is_sequence:
raise NotImplementedError
@@ -722,7 +723,6 @@ class IMAPMailbox(object):
read-write.
"""
# TODO implement sequences
- # TODO how often is thunderbird doing this?
is_sequence = True if uid == 0 else False
if is_sequence:
raise NotImplementedError