Commit db4426de authored by Vinay Sajip's avatar Vinay Sajip

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

parent 6846f354
......@@ -889,11 +889,11 @@ class SMTPHandler(logging.Handler):
certificate file. (This tuple is passed to the `starttls` method).
"""
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