From: Armin Ronacher Date: Wed, 16 Apr 2008 21:15:15 +0000 (+0200) Subject: debugger skips two internal frames now X-Git-Tag: 2.0rc1~162 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=6cc8dd0af8d8b02b8f844ba6674508d263c125a3;p=jinja2.git debugger skips two internal frames now --HG-- branch : trunk --- diff --git a/jinja2/debug.py b/jinja2/debug.py index 02b6177..ecd84ae 100644 --- a/jinja2/debug.py +++ b/jinja2/debug.py @@ -17,7 +17,7 @@ def translate_exception(exc_info): all the way down to the correct line numbers and frames. """ result_tb = prev_tb = None - initial_tb = tb = exc_info[2] + initial_tb = tb = exc_info[2].tb_next while tb is not None: template = tb.tb_frame.f_globals.get('__jinja_template__') @@ -65,7 +65,9 @@ def fake_exc_info(exc_info, filename, lineno, tb_back=None): tb_set_next(tb_back, exc_info[2]) if tb is not None: tb_set_next(exc_info[2].tb_next, tb.tb_next) - return exc_info + + # return without this frame + return exc_info[:2] + (exc_info[2].tb_next,) def _init_ugly_crap():