From 9e4d3f9ab446990222953186c7b5a9fe122c73eb Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Mon, 6 Aug 2012 20:05:46 +0200 Subject: [PATCH] [cherrypy] Trop merci les chaines unicode pour logguer Ignore-this: 822a4cd893d813004a6f172495e46a6f darcs-hash:20120806180546-ffbb2-0236bc541234aed5d94df386a865d917f2d79252.gz --- lib/cp.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/cp.py b/lib/cp.py index 48688690..aa47dbf7 100755 --- a/lib/cp.py +++ b/lib/cp.py @@ -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)