From: Armin Ronacher Date: Mon, 29 Nov 2010 11:24:03 +0000 (+0100) Subject: Traceback hack now works for pypy X-Git-Tag: 2.6~43 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=7ae5482ac45c7ad7df9cb41a04f937acdb45b7c0;p=jinja2.git Traceback hack now works for pypy --- 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)