Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4a8e9f4

Browse files
committed
SMTPServer.__init__(): Print the start information on the DEBUGSTREAM
so that it can be suppressed.
1 parent ef67ded commit 4a8e9f4

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/smtpd.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,8 @@ def __init__(self, localaddr, remoteaddr):
282282
self.socket.getsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR) | 1)
283283
self.bind(localaddr)
284284
self.listen(5)
285-
print '%s started at %s\n\tLocal addr: %s\n\tRemote addr:%s' % (
285+
print >> DEBUGSTREAM, \
286+
'%s started at %s\n\tLocal addr: %s\n\tRemote addr:%s' % (
286287
self.__class__.__name__, time.ctime(time.time()),
287288
localaddr, remoteaddr)
288289

0 commit comments

Comments
 (0)