From 1f7b0f2b0e2ba0ef8e09be678ab452951532bd37 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. --- src/leap/mail/smtp/gateway.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/leap/mail/smtp') diff --git a/src/leap/mail/smtp/gateway.py b/src/leap/mail/smtp/gateway.py index ef398d1..13d3bbf 100644 --- a/src/leap/mail/smtp/gateway.py +++ b/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