From a750ec93cbacf6130478dffe7bcc07f5566dab90 Mon Sep 17 00:00:00 2001 From: David Lord Date: Thu, 6 Dec 2018 08:02:45 -0800 Subject: [PATCH] use traceback.tb_lineno, frame.f_lineno is wrong for chained exceptions --- werkzeug/debug/tbtools.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/werkzeug/debug/tbtools.py b/werkzeug/debug/tbtools.py index 6885b1e83..3dc8803eb 100644 --- a/werkzeug/debug/tbtools.py +++ b/werkzeug/debug/tbtools.py @@ -437,7 +437,7 @@ class Frame(object): """A single frame in a traceback.""" def __init__(self, exc_type, exc_value, tb): - self.lineno = tb.tb_frame.f_lineno + self.lineno = tb.tb_lineno self.function_name = tb.tb_frame.f_code.co_name self.locals = tb.tb_frame.f_locals self.globals = tb.tb_frame.f_globals