Skip to content

Commit 1448c4b

Browse files
committed
Issue #22646: Accept list as well as tuple to support initialisation via dictConfig().
1 parent 6bb8a4c commit 1448c4b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/logging/handlers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -931,11 +931,11 @@ def __init__(self, mailhost, fromaddr, toaddrs, subject,
931931
default is one second).
932932
"""
933933
logging.Handler.__init__(self)
934-
if isinstance(mailhost, tuple):
934+
if isinstance(mailhost, (list, tuple)):
935935
self.mailhost, self.mailport = mailhost
936936
else:
937937
self.mailhost, self.mailport = mailhost, None
938-
if isinstance(credentials, tuple):
938+
if isinstance(credentials, (list, tuple)):
939939
self.username, self.password = credentials
940940
else:
941941
self.username = None

0 commit comments

Comments
 (0)