[Twisted-Python] Small bug fix for twisted.mail.pop3

Andreas Kostyrka andreas at kostyrka.org
Fri Sep 3 04:15:57 MDT 2004


Hi!

I'd propose to include this small patch, as it seems to be
unconditionally verbose:


Index: twisted/mail/pop3.py
===================================================================
--- twisted/mail/pop3.py        (revision 11428)
+++ twisted/mail/pop3.py        (working copy)
@@ -148,7 +148,8 @@
             self.magic = self.generateMagic()
         self.successResponse(self.magic)
         self.setTimeout(self.timeOut)
-        log.msg("New connection from " + str(self.transport.getPeer()))
+       if self.factory.noisy:
+            log.msg("New connection from " + str(self.transport.getPeer()))

     def connectionLost(self, reason):
         if self._onLogout is not None:


As noisy is defined twisted.internet.protocol.Factory, it should benign,
running trial on twisted/test doesn't seem to produce anything worse
than a heap of Deprecation warnings.

TIA,

Andreas
-- 
Andreas Kostyrka
Josef-Mayer-Strasse 5
83043 Bad Aibling




More information about the Twisted-Python mailing list