fuller Debug messages

`limit` argument is removed as unused
This commit is contained in:
caryoscelus 2022-05-21 21:14:37 +04:00
parent fca3c8544d
commit 8d2c5990cd
1 changed files with 3 additions and 7 deletions

View File

@ -35,7 +35,7 @@ root_dir = os.path.realpath(os.path.dirname(__file__) + "/../../")
root_dir = root_dir.replace("\\", "/") root_dir = root_dir.replace("\\", "/")
def formatTraceback(items, limit=None, fold_builtin=True): def formatTraceback(items, fold_builtin=False):
back = [] back = []
i = 0 i = 0
prev_file_title = "" prev_file_title = ""
@ -101,10 +101,6 @@ def formatTraceback(items, limit=None, fold_builtin=True):
prev_file_title = file_title prev_file_title = file_title
is_prev_builtin = is_builtin is_prev_builtin = is_builtin
if limit and i >= limit:
back.append("...")
break
return back return back
@ -131,9 +127,9 @@ def formatException(err=None, format="text"):
return "%s: %s in %s" % (exc_type.__name__, err, " > ".join(tb)) return "%s: %s in %s" % (exc_type.__name__, err, " > ".join(tb))
def formatStack(limit=None): def formatStack():
import inspect import inspect
tb = formatTraceback([[frame[1], frame[2]] for frame in inspect.stack()[1:]], limit=limit) tb = formatTraceback([[frame[1], frame[2]] for frame in inspect.stack()[1:]])
return " > ".join(tb) return " > ".join(tb)