commit 85d34853512c9b8a2227e5026c9a60aa537260ef Author: Isis Lovecruft isis@torproject.org Date: Mon Apr 7 00:08:56 2014 +0000
Import `defer` rather than `Deferred` in EmailServer. --- lib/bridgedb/EmailServer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/bridgedb/EmailServer.py b/lib/bridgedb/EmailServer.py index 84b6804..92a93bb 100644 --- a/lib/bridgedb/EmailServer.py +++ b/lib/bridgedb/EmailServer.py @@ -19,8 +19,8 @@ import time from ipaddr import IPv4Address from ipaddr import IPv6Address
+from twisted.internet import defer from twisted.internet import reactor -from twisted.internet.defer import Deferred from twisted.internet.task import LoopingCall import twisted.mail.smtp from twisted.internet.error import ConnectionRefusedError @@ -281,7 +281,7 @@ def replyToMail(lines, ctx): response.seek(0) logging.info("Sending reply to %r", util.logSafely(sendToUser))
- d = Deferred() + d = defer.Deferred() factory = twisted.mail.smtp.SMTPSenderFactory(ctx.smtpFromAddr, sendToUser, response, d, retries=0, timeout=30) @@ -369,7 +369,7 @@ class MailMessage: """Called when we receive the end of a message.""" if not self.ignoring: replyToMail(self.lines, self.ctx) - return twisted.internet.defer.succeed(None) + return defer.succeed(None)
def connectionLost(self): """Called if we die partway through reading a message."""
tor-commits@lists.torproject.org