mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Closes #22646: Accept list as well as tuple to support initialisation via dictConfig().
This commit is contained in:
commit
c2c62b13ce
1 changed files with 2 additions and 2 deletions
|
@ -931,11 +931,11 @@ class SMTPHandler(logging.Handler):
|
|||
default is one second).
|
||||
"""
|
||||
logging.Handler.__init__(self)
|
||||
if isinstance(mailhost, tuple):
|
||||
if isinstance(mailhost, (list, tuple)):
|
||||
self.mailhost, self.mailport = mailhost
|
||||
else:
|
||||
self.mailhost, self.mailport = mailhost, None
|
||||
if isinstance(credentials, tuple):
|
||||
if isinstance(credentials, (list, tuple)):
|
||||
self.username, self.password = credentials
|
||||
else:
|
||||
self.username = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue