summaryrefslogtreecommitdiffstats
path: root/Lib/logging
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2014-10-17 07:52:20 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2014-10-17 07:52:20 (GMT)
commitc2c62b13ce512b5000cd659d08505be607fa7c4a (patch)
tree6cd7dd56ff2d49f1255c0257ef53e340e94d5b0a /Lib/logging
parent353474fc714cc8885d237e7838d8128c3266271f (diff)
parent16c41ab4603c0ce14ff6cbf55965fd7e1a46e6b4 (diff)
downloadcpython-c2c62b13ce512b5000cd659d08505be607fa7c4a.zip
cpython-c2c62b13ce512b5000cd659d08505be607fa7c4a.tar.gz
cpython-c2c62b13ce512b5000cd659d08505be607fa7c4a.tar.bz2
Closes #22646: Accept list as well as tuple to support initialisation via dictConfig().
Diffstat (limited to 'Lib/logging')
-rw-r--r--Lib/logging/handlers.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/logging/handlers.py b/Lib/logging/handlers.py
index 0e58dbe..b371824 100644
--- a/Lib/logging/handlers.py
+++ b/Lib/logging/handlers.py
@@ -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