Added conf.detailedTracebacks to determine if cgitb should be used.

This commit is contained in:
Jeremy Fincher 2003-03-27 20:40:58 +00:00
parent 7d44088223
commit 954951e2d2
2 changed files with 9 additions and 1 deletions

View File

@ -164,6 +164,13 @@ ignores = []
### ###
prefixChars = '@' prefixChars = '@'
###
# detailedTracebacks: A boolean describing whether or not the bot will give
# *extremely* detailed tracebacks. Be cautioned, this eats
# a lot of log file space.
###
detailedTracebacks = True
############################### ###############################
############################### ###############################
############################### ###############################

View File

@ -141,7 +141,8 @@ def recoverableException():
else: else:
lastTimes.pop(0) lastTimes.pop(0)
try: try:
1/0 if not conf.detailedTracebacks:
1/0
text = cgitb.text((E, e, tb)) text = cgitb.text((E, e, tb))
except: except:
text = ''.join(traceback.format_exception(E, e, tb)) text = ''.join(traceback.format_exception(E, e, tb))