[py-svn] r59464 - py/trunk/py/code
arigo at codespeak.net
arigo at codespeak.net
Tue Oct 28 10:02:19 CET 2008
Author: arigo
Date: Tue Oct 28 10:02:19 2008
New Revision: 59464
Modified:
py/trunk/py/code/frame.py
Log:
Fix for a corner case: when the arguments are 'del'-eted from
the local scope. This can also occur when using Psyco because
f_locals is then empty.
Modified: py/trunk/py/code/frame.py
==============================================================================
--- py/trunk/py/code/frame.py (original)
+++ py/trunk/py/code/frame.py Tue Oct 28 10:02:19 2008
@@ -50,6 +50,9 @@
"""
retval = []
for arg in self.code.getargs():
- retval.append((arg, self.f_locals[arg]))
+ try:
+ retval.append((arg, self.f_locals[arg]))
+ except KeyError:
+ pass # this can occur when using Psyco
return retval
More information about the pytest-commit
mailing list