Skip to content
Myr

Should work for cpython and pypy now (if the latter is fixed)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Armin Ronacher · committed by Armin Ronacher · parent 19a2374 · Browse files · 1 file+7 added−9 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+7 added−9 removed

  • other:+7 added−9 removed

1 file+7 added−9 removed

modified:jinja2/debug.py+7 added-9 removed
37 unmodified lines
38 def __init__(self, tb):39 self.tb = tb40 self._tb_next = None4142 @property43 def tb_next(self):44 return self._tb_next4542 def _set_tb_next(self, next):46 def set_next(self, next):47 if tb_set_next is not None:48 tb_set_next(self.tb, next and next.tb or None)49 self._tb_next = next5047 def _get_tb_next(self):48 return self._tb_next4950 tb_next = property(_get_tb_next, _set_tb_next)51 del _get_tb_next, _set_tb_next5251 @property52 def is_jinja_frame(self):53 return '__jinja_template__' in self.tb.tb_frame.f_globals54
22 unmodified lines
77 # newly concatenate the frames (which are proxies)78 prev_tb = None79 for tb in self.frames:80 if prev_tb is not None:83 prev_tb._tb_next = tb81 prev_tb.set_next(tb)82 prev_tb = tb85 prev_tb._tb_next = None83 prev_tb.set_next(None)8485 def render_as_text(self, limit=None):86 """Return a string with the traceback."""87 lines = traceback.format_exception(self.exc_type, self.exc_value,
241 unmodified lines