py3 filter->list(filter

This commit is contained in:
j 2017-02-16 14:24:51 +01:00
commit 12f3901c9a
17 changed files with 48 additions and 48 deletions

View file

@ -108,7 +108,7 @@ class ApiActions(dict):
else:
f = self[name]
if name != 'api' and hasattr(f, 'func_closure') and f.func_closure:
fc = filter(lambda c: hasattr(c.cell_contents, '__call__'), f.func_closure)
fc = list(filter(lambda c: hasattr(c.cell_contents, '__call__'), f.func_closure))
f = fc[len(fc)-1].cell_contents
if PY2:
info = f.func_code.co_filename[len(settings.PROJECT_ROOT)+1:]