Escape Unicode before logging
- Legacy-Id: 1742
This commit is contained in:
parent
9e9df53c23
commit
3aa6349e7d
|
@ -21,6 +21,8 @@ def getcaller():
|
|||
return (pmodule, pclass, pfunction, pfile, pline)
|
||||
|
||||
def log(msg):
|
||||
if isinstance(msg, unicode):
|
||||
msg = msg.encode('unicode_escape')
|
||||
try:
|
||||
mod, cls, func, file, line = getcaller()
|
||||
file = os.path.abspath(file)
|
||||
|
|
Loading…
Reference in a new issue