Removed possible UnboundLocalError that would (a) crash the bot, and (b) never be reported.

This commit is contained in:
Jeremy Fincher 2003-09-23 15:38:40 +00:00
parent 14f008df26
commit fa1115327f

View File

@ -161,8 +161,11 @@ def recoverableException(type='detailed'):
else:
del lastTimes[0]
try:
if type == 'detailed' and conf.detailedTracebacks:
if type == 'detailed':
if conf.detailedTracebacks:
text = cgitb.text((E, e, tb))
else:
text = ''.join(traceback.format_exception(E, e, tb))
elif type == 'normal':
text = ''.join(traceback.format_exception(E, e, tb))
elif type == 'terse':