summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2014-01-20 12:59:35 -0400
committerKali Kaneko <kali@leap.se>2014-01-20 12:59:35 -0400
commitc286d31a8d447baaaaa105af866ecbfc26e1c717 (patch)
treeda95c8d20c49a210eb0e1882d9b65fabb5c90f38 /mail
parentb2c2f4727546910de438265b16a87a9a49eef929 (diff)
parent4886721f7e980994405c5ab926e57445bffe2c52 (diff)
Merge remote-tracking branch 'chiiph/bug/fix-search-command-filter' into develop
Diffstat (limited to 'mail')
-rw-r--r--mail/src/leap/mail/imap/mailbox.py13
1 files changed, 7 insertions, 6 deletions
diff --git a/mail/src/leap/mail/imap/mailbox.py b/mail/src/leap/mail/imap/mailbox.py
index a167531..174361f 100644
--- a/mail/src/leap/mail/imap/mailbox.py
+++ b/mail/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,))