From 954951e2d27272a2d80a011b863de03e4431de0f Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 27 Mar 2003 20:40:58 +0000 Subject: [PATCH] Added conf.detailedTracebacks to determine if cgitb should be used. --- src/conf.py | 7 +++++++ src/debug.py | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/conf.py b/src/conf.py index ebad5c973..9289bfefe 100644 --- a/src/conf.py +++ b/src/conf.py @@ -164,6 +164,13 @@ ignores = [] ### 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 + ############################### ############################### ############################### diff --git a/src/debug.py b/src/debug.py index e868962c8..1c936dbd4 100644 --- a/src/debug.py +++ b/src/debug.py @@ -141,7 +141,8 @@ def recoverableException(): else: lastTimes.pop(0) try: - 1/0 + if not conf.detailedTracebacks: + 1/0 text = cgitb.text((E, e, tb)) except: text = ''.join(traceback.format_exception(E, e, tb))