diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2014-10-17 07:49:38 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2014-10-17 07:49:38 (GMT) |
commit | 16c41ab4603c0ce14ff6cbf55965fd7e1a46e6b4 (patch) | |
tree | c5367cea6871dc5cf413c746fe3afd0d6a1095a7 /Lib | |
parent | cd567365c9f95cf005d6bb7c1da7946b68a43ab4 (diff) | |
download | cpython-16c41ab4603c0ce14ff6cbf55965fd7e1a46e6b4.zip cpython-16c41ab4603c0ce14ff6cbf55965fd7e1a46e6b4.tar.gz cpython-16c41ab4603c0ce14ff6cbf55965fd7e1a46e6b4.tar.bz2 |
Issue #22646: Accept list as well as tuple to support initialisation via dictConfig().
Diffstat (limited to 'Lib')
-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 |