Commit 16c41ab4 authored by Vinay Sajip's avatar Vinay Sajip

Issue #22646: Accept list as well as tuple to support initialisation via dictConfig().

parent cd567365
......@@ -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
......
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