]> granicus.if.org Git - python/commitdiff
Issue #22646: Accept list as well as tuple to support initialisation via dictConfig().
authorVinay Sajip <vinay_sajip@yahoo.co.uk>
Fri, 17 Oct 2014 07:49:38 +0000 (08:49 +0100)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>
Fri, 17 Oct 2014 07:49:38 +0000 (08:49 +0100)
Lib/logging/handlers.py

index 0e58dbea059eefb59a7b81704b8bfe2f33e73817..b371824054370a9449f722e90f3ac73d474a9677 100644 (file)
@@ -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