New submission from Robert Szefler <[email protected]>:
Trying to .emit() a Unicode string causes an awkward exception to be thrown:
Traceback (most recent call last):
File "/usr/lib/python2.5/logging/handlers.py", line 672, in emit
self.socket.sendto(msg, self.address)
TypeError: sendto() takes exactly 3 arguments (2 given)
The issue is fixed simply by adding some sort of encoding coercion
before the sendto, for example:
if type(msg)==unicode: msg=msg.encode('utf-8')
----------
components: Library (Lib)
messages: 93694
nosy: rszefler
severity: normal
status: open
title: SysLogHandler can't handle Unicode
type: behavior
versions: Python 2.5
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue7077>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com