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: else:
del lastTimes[0] del lastTimes[0]
try: try:
if type == 'detailed' and conf.detailedTracebacks: if type == 'detailed':
text = cgitb.text((E, e, tb)) if conf.detailedTracebacks:
text = cgitb.text((E, e, tb))
else:
text = ''.join(traceback.format_exception(E, e, tb))
elif type == 'normal': elif type == 'normal':
text = ''.join(traceback.format_exception(E, e, tb)) text = ''.join(traceback.format_exception(E, e, tb))
elif type == 'terse': elif type == 'terse':