diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2014-10-17 08:42:57 +0100 |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2014-10-17 08:42:57 +0100 |
commit | 0746b002880ef22385135c85e03ddc3d1570a411 (patch) | |
tree | 95c0dd37a62e4bff83ba9750fe9a9becf73cf68e /Lib/logging | |
parent | cf834769e4f2c3b14c93091334f2334284c9d8c0 (diff) | |
download | cpython-git-0746b002880ef22385135c85e03ddc3d1570a411.tar.gz |
Issue #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 b7bf931aa4..201d2b5a7d 100644 --- a/Lib/logging/handlers.py +++ b/Lib/logging/handlers.py @@ -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 |