Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

  • Loading branch information...
commit 9e5d08326842b9ee0070794639faad72fed72ff6 1 parent 19a2374
Armin Ronacher authored November 29, 2010

Showing 1 changed file with 7 additions and 9 deletions. Show diff stats Hide diff stats

  1. 16  jinja2/debug.py
16  jinja2/debug.py
@@ -39,17 +39,15 @@ def __init__(self, tb):
39 39
         self.tb = tb
40 40
         self._tb_next = None
41 41
 
42  
-    def _set_tb_next(self, next):
  42
+    @property
  43
+    def tb_next(self):
  44
+        return self._tb_next
  45
+
  46
+    def set_next(self, next):
43 47
         if tb_set_next is not None:
44 48
             tb_set_next(self.tb, next and next.tb or None)
45 49
         self._tb_next = next
46 50
 
47  
-    def _get_tb_next(self):
48  
-        return self._tb_next
49  
-
50  
-    tb_next = property(_get_tb_next, _set_tb_next)
51  
-    del _get_tb_next, _set_tb_next
52  
-
53 51
     @property
54 52
     def is_jinja_frame(self):
55 53
         return '__jinja_template__' in self.tb.tb_frame.f_globals
@@ -80,9 +78,9 @@ def __init__(self, exc_type, exc_value, frames):
80 78
         prev_tb = None
81 79
         for tb in self.frames:
82 80
             if prev_tb is not None:
83  
-                prev_tb._tb_next = tb
  81
+                prev_tb.set_next(tb)
84 82
             prev_tb = tb
85  
-        prev_tb._tb_next = None
  83
+        prev_tb.set_next(None)
86 84
 
87 85
     def render_as_text(self, limit=None):
88 86
         """Return a string with the traceback."""

0 notes on commit 9e5d083

Please sign in to comment.
Something went wrong with that request. Please try again.