diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2014-10-17 07:52:20 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2014-10-17 07:52:20 (GMT) |
commit | c2c62b13ce512b5000cd659d08505be607fa7c4a (patch) | |
tree | 6cd7dd56ff2d49f1255c0257ef53e340e94d5b0a /Lib/logging | |
parent | 353474fc714cc8885d237e7838d8128c3266271f (diff) | |
parent | 16c41ab4603c0ce14ff6cbf55965fd7e1a46e6b4 (diff) | |
download | cpython-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.py | 4 |
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 |