Kaydet (Commit) 8c5e920a authored tarafından Brett Cannon's avatar Brett Cannon

merge

...@@ -872,7 +872,7 @@ class SMTPHandler(logging.Handler): ...@@ -872,7 +872,7 @@ class SMTPHandler(logging.Handler):
A handler class which sends an SMTP email for each logging event. A handler class which sends an SMTP email for each logging event.
""" """
def __init__(self, mailhost, fromaddr, toaddrs, subject, def __init__(self, mailhost, fromaddr, toaddrs, subject,
credentials=None, secure=None, timeout=1.0): credentials=None, secure=None, timeout=5.0):
""" """
Initialize the handler. Initialize the handler.
......
...@@ -930,7 +930,7 @@ class SMTPHandlerTest(BaseTest): ...@@ -930,7 +930,7 @@ class SMTPHandlerTest(BaseTest):
sockmap) sockmap)
server.start() server.start()
addr = ('localhost', server.port) addr = ('localhost', server.port)
h = logging.handlers.SMTPHandler(addr, 'me', 'you', 'Log') h = logging.handlers.SMTPHandler(addr, 'me', 'you', 'Log', timeout=5.0)
self.assertEqual(h.toaddrs, ['you']) self.assertEqual(h.toaddrs, ['you'])
self.messages = [] self.messages = []
r = logging.makeLogRecord({'msg': 'Hello'}) r = logging.makeLogRecord({'msg': 'Hello'})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment