[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



commit 85d34853512c9b8a2227e5026c9a60aa537260ef
Author: Isis Lovecruft <isis@xxxxxxxxxxxxxx>
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 mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits