From 7ae5482ac45c7ad7df9cb41a04f937acdb45b7c0 Mon Sep 17 00:00:00 2001 From: Armin Ronacher Date: Mon, 29 Nov 2010 12:24:03 +0100 Subject: [PATCH] Traceback hack now works for pypy --- jinja2/debug.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/jinja2/debug.py b/jinja2/debug.py index 2f46c22..f1cc3bc 100644 --- a/jinja2/debug.py +++ b/jinja2/debug.py @@ -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) -- 2.26.2