diff options
author | Kali Kaneko <kali@leap.se> | 2015-09-24 15:16:03 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2015-09-24 15:16:03 -0400 |
commit | e714515718cc36fa1e31f9cf90a9a9728d4a4fbd (patch) | |
tree | f78d99e3ea38663c2841525f9a6e197e132925f6 /src/leap/mail/imap/mailbox.py | |
parent | bca46ee76f31a1272245156d3f2c6fcd4c7da180 (diff) | |
parent | 1b8e9f5d6df6aedd3566069d9d27adc1d8ad771d (diff) |
Merge branch 'develop' into debian/experimental
Diffstat (limited to 'src/leap/mail/imap/mailbox.py')
-rw-r--r-- | src/leap/mail/imap/mailbox.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/leap/mail/imap/mailbox.py b/src/leap/mail/imap/mailbox.py index c52a2e3..c7accbb 100644 --- a/src/leap/mail/imap/mailbox.py +++ b/src/leap/mail/imap/mailbox.py @@ -215,11 +215,13 @@ class IMAPMailbox(object): but in the future will be useful to get absolute UIDs from message sequence numbers. + :param message: the message sequence number. :type message: int :rtype: int :return: the UID of the message. + """ # TODO support relative sequences. The (imap) message should # receive a sequence number attribute: a deferred is not expected @@ -558,7 +560,8 @@ class IMAPMailbox(object): def _get_imap_msg(messages): d_imapmsg = [] - for msg in messages: + # just in case we got bad data in here + for msg in filter(None, messages): d_imapmsg.append(getimapmsg(msg)) return defer.gatherResults(d_imapmsg, consumeErrors=True) |