diff options
author | Kali Kaneko <kali@leap.se> | 2013-08-16 20:39:58 +0200 |
---|---|---|
committer | Kali Kaneko <kali@leap.se> | 2013-08-16 20:39:58 +0200 |
commit | 75141e7504498b8092d1e860c8cd8879cc539fbb (patch) | |
tree | 9c468f3e69bb31609688e4112aca72e6eb0a53bb /src/leap | |
parent | 518b79bd19fc00b6509b6cb7868a385497deb494 (diff) | |
parent | 34541d50c26a894489d594f5314781ea4ff8bbf2 (diff) |
Merge remote-tracking branch 'chiiph/bug/dont_fail_on_empty_mail' into develop
Diffstat (limited to 'src/leap')
-rw-r--r-- | src/leap/mail/imap/fetch.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/leap/mail/imap/fetch.py b/src/leap/mail/imap/fetch.py index 9b76592..4a939fd 100644 --- a/src/leap/mail/imap/fetch.py +++ b/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 |