Skip to content

Commit

Permalink
Fix for __closure__ being missing on ancient versions of PyPy
Browse files Browse the repository at this point in the history
  • Loading branch information
epsy committed May 27, 2016
1 parent b865d86 commit 91c8737
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sigtools/_autoforwards.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,10 @@ def resolve_name(obj, func, args, unknown=False):
raise UnresolvableName(obj)
else:
try:
return func.__closure__[index].cell_contents
try:
return func.__closure__[index].cell_contents
except AttributeError:
return func.func_closure[index].cell_contents
except ValueError:
raise UnresolvableName(obj)
elif isinstance(obj, Arg):
Expand Down

0 comments on commit 91c8737

Please sign in to comment.