Fixed a bug in jinja2/debug (second time, forgot to merge and threw away changes...
authorArmin Ronacher <armin.ronacher@active-4.com>
Fri, 17 Apr 2009 09:21:00 +0000 (11:21 +0200)
committerArmin Ronacher <armin.ronacher@active-4.com>
Fri, 17 Apr 2009 09:21:00 +0000 (11:21 +0200)
--HG--
branch : trunk

jinja2/debug.py

index b6a64e36434a92984dd0630e015e050c208ea26c..aa78ef0f194dfa8ca4f4fbf1e9608aa802464120 100644 (file)
@@ -184,7 +184,12 @@ def fake_exc_info(exc_info, filename, lineno):
     globals = {
         '__name__':             filename,
         '__file__':             filename,
-        '__jinja_exception__':  exc_info[:2]
+        '__jinja_exception__':  exc_info[:2],
+
+        # we don't want to keep the reference to the template around
+        # to not cause circular dependencies, but we mark it as Jinja
+        # frame for the ProcessedTraceback
+        '__jinja_template__':   None
     }
 
     # and fake the exception