#15917: Logging dictionary config works wrong at least with SMTPHandler
------------------------------------+------------------------------
               Reporter:  albenik   |          Owner:  nobody
                   Type:  Bug       |         Status:  reopened
              Milestone:            |      Component:  Core (Other)
                Version:  1.3       |       Severity:  Normal
             Resolution:            |       Keywords:
           Triage Stage:  Accepted  |      Has patch:  0
    Needs documentation:  0         |    Needs tests:  0
Patch needs improvement:  0         |  Easy pickings:  0
                  UI/UX:  0         |
------------------------------------+------------------------------
Changes (by jeverling):

 * cc: jeverling (added)
 * ui_ux:   => 0


Comment:

 I also ran into this issue, because I was trying to specify the SMPT-port
 (for TLS).[[BR]]
 You are supposed to pass mailhost = (HOST, PORT) to SMTPHandler. However,
 as albenik said, SMTPHandler.init does type-checking which fails due to
 mailhost being of type django.utils.dictconfig.ConvertingTuple:


 /usr/lib/python2.6/logging/handlers.py:819
 {{{
 if type(mailhost) == types.TupleType:
     self.mailhost, self.mailport = mailhost
 }}}



 This issue doesn't exist in Python 2.7:[[BR]]
 /usr/lib/python2.7/logging/handlers.py:841
 {{{
 if isinstance(mailhost, tuple):
     self.mailhost, self.mailport = mailhost
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/15917#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to