[docs] 15.9.11. SMTPHandler - bug?
Alexander Heger
alex.heger at gmail.com
Fri Jul 29 15:45:56 CEST 2011
I use Python 2.7.1 that comes with the current Fedora 15
2.6.38.8-35.fc15.x86_64.
When I try to use the logging.handlers.SMTPHandler I get
Traceback (most recent call last):
File "/usr/lib64/python2.7/logging/handlers.py", line 885, in emit
smtp.starttls(*self.secure)
TypeError: starttls() argument after * must be a sequence, not bool
Logged from file <ipython console>, line 1
so it should be called with a tuple to make it work, not just a
Boolean. Or the code needs to be changed, but maybe easier to just
change documentation
secure=(True,)
It still does not work in the end, however.
Traceback (most recent call last):
File "/usr/lib64/python2.7/logging/handlers.py", line 885, in emit
smtp.starttls(*self.secure)
File "/usr/lib64/python2.7/smtplib.py", line 619, in starttls
self.sock = ssl.wrap_socket(self.sock, keyfile, certfile)
File "/usr/lib64/python2.7/ssl.py", line 344, in wrap_socket
ciphers=ciphers)
File "/usr/lib64/python2.7/ssl.py", line 119, in __init__
ciphers)
TypeError: must be string or None, not bool
-Alexander
More information about the docs
mailing list