[cherrypy] Trop merci les chaines unicode pour logguer

Ignore-this: 822a4cd893d813004a6f172495e46a6f

darcs-hash:20120806180546-ffbb2-0236bc541234aed5d94df386a865d917f2d79252.gz
This commit is contained in:
Nicolas Dandrimont 2012-08-06 20:05:46 +02:00
parent 7866b5adeb
commit 9e4d3f9ab4

View file

@ -34,7 +34,8 @@ def log(string, keyword = "INTRANET", level = 0):
"""
try:
login = cherrypy.session['uid']
string = "[%s] %s" % ( login, string )
string = u"[%s] %s" % ( login, string )
except:
pass
string = string.encode("utf-8")
cherrypy.log(string, keyword, level)