diff options
author | Kali Kaneko <kali@leap.se> | 2014-01-20 12:59:35 -0400 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2014-01-20 12:59:35 -0400 |
commit | 547ee79bd4b2ee9bb05dad3613d5056de1f21712 (patch) | |
tree | bfc04c21711e6d8e49a553f1c4e3363d92fe4b29 /src/leap/mail/imap/mailbox.py | |
parent | f2cbd92aa17566f6bdd94c59fdace81fc5b16098 (diff) | |
parent | ca9ba607ec09036db387dda6704b5956fc7baae5 (diff) |
Merge remote-tracking branch 'chiiph/bug/fix-search-command-filter' into develop
Diffstat (limited to 'src/leap/mail/imap/mailbox.py')
-rw-r--r-- | src/leap/mail/imap/mailbox.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/leap/mail/imap/mailbox.py b/src/leap/mail/imap/mailbox.py index a167531..174361f 100644 --- a/src/leap/mail/imap/mailbox.py +++ b/src/leap/mail/imap/mailbox.py @@ -742,12 +742,13 @@ class SoledadMailbox(WithMsgFields, MBoxParser): # but doing a quickfix for avoiding duplicat saves in the draft folder. # See issue #4209 - if query[1] == 'HEADER' and query[2].lower() == "message-id": - msgid = str(query[3]).strip() - d = self.messages._get_uid_from_msgid(str(msgid)) - d1 = defer.gatherResults([d]) - # we want a list, so return it all the same - return d1 + if len(query) > 2: + if query[1] == 'HEADER' and query[2].lower() == "message-id": + msgid = str(query[3]).strip() + d = self.messages._get_uid_from_msgid(str(msgid)) + d1 = defer.gatherResults([d]) + # we want a list, so return it all the same + return d1 # nothing implemented for any other query logger.warning("Cannot process query: %s" % (query,)) |