fix when backtrace contains some unicode chars (and because python sucks)

This commit is contained in:
Romain Bignon 2010-07-13 00:10:13 +02:00
commit e1939b7e4a

View file

@ -32,7 +32,7 @@ class CallErrors(Exception):
def __init__(self, errors):
Exception.__init__(self, u'These errors have been raised in backend threads '\
'(use --debug option to print backtraces):\n%s' % (
u'\n'.join((u' * %s: %s%s' % (backend, repr(error), backtrace + '\n'
u'\n'.join((u' * %s: %s%s' % (backend, repr(error), backtrace.decode('utf-8') + '\n'
if logging.root.level == logging.DEBUG else ''))
for backend, error, backtrace in errors)))
self.errors = copy(errors)