From 85e5bb0279b47982b535a2711c156d61a9ee235e Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 9 Sep 2014 10:18:09 -0500 Subject: return the deferred from sendMessage in this way we allow to add more callbacks to the chain. --- mail/src/leap/mail/smtp/gateway.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mail/src/leap') diff --git a/mail/src/leap/mail/smtp/gateway.py b/mail/src/leap/mail/smtp/gateway.py index ef398d1f..13d3bbf9 100644 --- a/mail/src/leap/mail/smtp/gateway.py +++ b/mail/src/leap/mail/smtp/gateway.py @@ -463,13 +463,13 @@ class EncryptedMessage(object): """ Sends the message. - :return: A deferred with callbacks for error and success of this - #message send. + :return: A deferred with callback and errback for + this #message send. :rtype: twisted.internet.defer.Deferred """ d = deferToThread(self._route_msg) d.addCallbacks(self.sendQueued, self.sendError) - return + return d def _route_msg(self): """ -- cgit v1.2.3 From aea236ee3b9467bc6754f5a10ccda4c78e6bd66d Mon Sep 17 00:00:00 2001 From: Kali Kaneko Date: Tue, 9 Sep 2014 10:18:50 -0500 Subject: add comment --- mail/src/leap/mail/imap/mailbox.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mail/src/leap') diff --git a/mail/src/leap/mail/imap/mailbox.py b/mail/src/leap/mail/imap/mailbox.py index aa2a3007..34cf5355 100644 --- a/mail/src/leap/mail/imap/mailbox.py +++ b/mail/src/leap/mail/imap/mailbox.py @@ -459,6 +459,8 @@ class SoledadMailbox(WithMsgFields, MBoxParser): notify_on_disk=notify_on_disk) if PROFILE_CMD: do_profile_cmd(d, "APPEND") + + # XXX should review now that we're not using qtreactor. # A better place for this would be the COPY/APPEND dispatcher # in server.py, but qtreactor hangs when I do that, so this seems # to work fine for now. -- cgit v1.2.3