[svn r59464] 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.

--HG--
branch : trunk
This commit is contained in:
arigo 2008-10-28 10:02:19 +01:00
parent 96ff172661
commit 03f51e5edb
1 changed files with 4 additions and 1 deletions

View File

@ -50,6 +50,9 @@ class Frame(object):
"""
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