Traceback hack now works for pypy
authorArmin Ronacher <armin.ronacher@active-4.com>
Mon, 29 Nov 2010 11:24:03 +0000 (12:24 +0100)
committerArmin Ronacher <armin.ronacher@active-4.com>
Mon, 29 Nov 2010 11:24:03 +0000 (12:24 +0100)
jinja2/debug.py

index 2f46c22c151d54cda4e03d78ced5bed16afaf1ec..f1cc3bc3da6fcc752a42488bd2c032513e9828ab 100644 (file)
@@ -61,7 +61,12 @@ def make_frame_proxy(frame):
     if tproxy is None:
         return proxy
     def operation_handler(operation, *args, **kwargs):
-        return getattr(proxy, operation)(*args, **kwargs)
+        if operation in ('__getattribute__', '__getattr__'):
+            return getattr(proxy, args[0])
+        elif operation == '__setattr__':
+            proxy.__setattr__(*args, **kwargs)
+        else:
+            return getattr(proxy, operation)(*args, **kwargs)
     return tproxy(TracebackType, operation_handler)