diff options
author | Armin Ronacher <armin.ronacher@active-4.com> | 2010-11-29 12:24:03 +0100 |
---|---|---|
committer | Armin Ronacher <armin.ronacher@active-4.com> | 2010-11-29 12:24:03 +0100 |
commit | 7ae5482ac45c7ad7df9cb41a04f937acdb45b7c0 (patch) | |
tree | 068535c2772a60de3ee10e4715ac95dedf4aa6f1 /jinja2/debug.py | |
parent | 9e5d08326842b9ee0070794639faad72fed72ff6 (diff) | |
download | jinja2-7ae5482ac45c7ad7df9cb41a04f937acdb45b7c0.tar.gz |
Traceback hack now works for pypy
Diffstat (limited to 'jinja2/debug.py')
-rw-r--r-- | jinja2/debug.py | 7 |
1 files changed, 6 insertions, 1 deletions
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) |