Fix bad encoding in log message

bzr revid: ced-b2cc42173f8b1ac92443c1af90c5cc8a4eb5143f
This commit is contained in:
ced 2007-11-27 15:43:46 +00:00
parent 8ea922fb67
commit 35ad3d190f
1 changed files with 3 additions and 1 deletions

View File

@ -183,7 +183,9 @@ class rml_parse(object):
except Exception,e:
import traceback, sys
tb_s = reduce(lambda x, y: x+y, traceback.format_exception(sys.exc_type, sys.exc_value, sys.exc_traceback))
netsvc.Logger().notifyChannel('report', netsvc.LOG_ERROR, 'report %s:\n%s\n%s\nexpr: %s' % (self.name, tb_s, str(e), expr))
netsvc.Logger().notifyChannel('report', netsvc.LOG_ERROR,
'report %s:\n%s\n%s\nexpr: %s' % (self.name, tb_s, str(e),
expr.encode('utf-8')))
res = ''
return res