summaryrefslogtreecommitdiff
path: root/mail/src
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2013-08-16 20:39:58 +0200
committerKali Kaneko <kali@leap.se>2013-08-16 20:39:58 +0200
commitda2f5b76df7e14ff1efe38e43e976a2f0a365781 (patch)
treecf2aee16446b6558db4cd28ffb5e5d85eec05c93 /mail/src
parent7cf45f776fcf1d4d401a2fa55d034d2ddffd3591 (diff)
parent63022878d0e93f87c7e866ca143109d9cf1111f5 (diff)
Merge remote-tracking branch 'chiiph/bug/dont_fail_on_empty_mail' into develop
Diffstat (limited to 'mail/src')
-rw-r--r--mail/src/leap/mail/imap/fetch.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mail/src/leap/mail/imap/fetch.py b/mail/src/leap/mail/imap/fetch.py
index 9b76592f..4a939fd3 100644
--- a/mail/src/leap/mail/imap/fetch.py
+++ b/mail/src/leap/mail/imap/fetch.py
@@ -125,14 +125,15 @@ class LeapIncomingMail(object):
# XXX should check for _enc_scheme == "pubkey" || "none"
# that is what incoming mail uses.
encdata = doc.content[self.ENC_JSON_KEY]
- d = defer.Deferred(self._decrypt_msg(doc, encdata))
- d.addCallbacks(self._process_decrypted, log.msg)
+ defer.Deferred(self._decrypt_msg(doc, encdata))
else:
logger.debug('This does not look like a proper msg.')
def _decrypt_msg(self, doc, encdata):
log.msg('decrypting msg')
key = self._pkey
+ if len(encdata) == 0:
+ return
decrdata = (self._keymanager.decrypt(
encdata, key,
# XXX get from public method instead