mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
merge
This commit is contained in:
commit
8c5e920ae3
2 changed files with 2 additions and 2 deletions
|
@ -872,7 +872,7 @@ class SMTPHandler(logging.Handler):
|
|||
A handler class which sends an SMTP email for each logging event.
|
||||
"""
|
||||
def __init__(self, mailhost, fromaddr, toaddrs, subject,
|
||||
credentials=None, secure=None, timeout=1.0):
|
||||
credentials=None, secure=None, timeout=5.0):
|
||||
"""
|
||||
Initialize the handler.
|
||||
|
||||
|
|
|
@ -930,7 +930,7 @@ class SMTPHandlerTest(BaseTest):
|
|||
sockmap)
|
||||
server.start()
|
||||
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.messages = []
|
||||
r = logging.makeLogRecord({'msg': 'Hello'})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue