diff options
author | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2014-10-17 07:42:57 (GMT) |
---|---|---|
committer | Vinay Sajip <vinay_sajip@yahoo.co.uk> | 2014-10-17 07:42:57 (GMT) |
commit | 0746b002880ef22385135c85e03ddc3d1570a411 (patch) | |
tree | 95c0dd37a62e4bff83ba9750fe9a9becf73cf68e | |
parent | cf834769e4f2c3b14c93091334f2334284c9d8c0 (diff) | |
download | cpython-0746b002880ef22385135c85e03ddc3d1570a411.zip cpython-0746b002880ef22385135c85e03ddc3d1570a411.tar.gz cpython-0746b002880ef22385135c85e03ddc3d1570a411.tar.bz2 |
Issue #22646: Accept list as well as tuple to support initialisation via dictConfig().
-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 b7bf931..201d2b5 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 |