Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 9e5d08326842b9ee0070794639faad72fed72ff6 1 parent 19a2374
@mitsuhiko mitsuhiko authored
Showing with 7 additions and 9 deletions.
  1. +7 −9 jinja2/debug.py
View
16 jinja2/debug.py
@@ -39,17 +39,15 @@ def __init__(self, tb):
self.tb = tb
self._tb_next = None
- def _set_tb_next(self, next):
+ @property
+ def tb_next(self):
+ return self._tb_next
+
+ def set_next(self, next):
if tb_set_next is not None:
tb_set_next(self.tb, next and next.tb or None)
self._tb_next = next
- def _get_tb_next(self):
- return self._tb_next
-
- tb_next = property(_get_tb_next, _set_tb_next)
- del _get_tb_next, _set_tb_next
-
@property
def is_jinja_frame(self):
return '__jinja_template__' in self.tb.tb_frame.f_globals
@@ -80,9 +78,9 @@ def __init__(self, exc_type, exc_value, frames):
prev_tb = None
for tb in self.frames:
if prev_tb is not None:
- prev_tb._tb_next = tb
+ prev_tb.set_next(tb)
prev_tb = tb
- prev_tb._tb_next = None
+ prev_tb.set_next(None)
def render_as_text(self, limit=None):
"""Return a string with the traceback."""
Please sign in to comment.
Something went wrong with that request. Please try again.