Workaround for bug in cgitb.

This commit is contained in:
Jeremy Fincher 2003-12-16 23:13:48 +00:00
parent d4136073e1
commit a3edca49a0

View File

@ -64,7 +64,11 @@ class Formatter(logging.Formatter):
if issubclass(e.__class__, exn):
raise
if conf.detailedTracebacks:
try:
return cgitb.text((E, e, tb)).rstrip('\r\n')
except:
log.error('Cgitb.text raised an exception.')
return logging.Formatter.formatException(self, (E, e, tb))
else:
return logging.Formatter.formatException(self, (E, e, tb))