[tor-commits] [bridgedb/master] Import `defer` rather than `Deferred` in EmailServer.

isis at torproject.org isis at torproject.org
Sat Apr 19 17:02:42 UTC 2014


commit 85d34853512c9b8a2227e5026c9a60aa537260ef
Author: Isis Lovecruft <isis at 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."""





More information about the tor-commits mailing list