X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=wrw%2Futil.py;h=2e3a7954bc53877705facd1d8de6234af045d94a;hb=b342d9b2ded52cff1d172dbeedfd1aff40d92a1f;hp=5ee002b0702699c5bb0f5fa78367e82f328356d2;hpb=23d36b18a53d242f5d3c8d9bc2831a0e75900d94;p=wrw.git diff --git a/wrw/util.py b/wrw/util.py index 5ee002b..2e3a795 100644 --- a/wrw/util.py +++ b/wrw/util.py @@ -1,3 +1,4 @@ +from __future__ import with_statement import inspect import req, dispatch, session, form @@ -12,9 +13,9 @@ def formparams(callable): spec = inspect.getargspec(callable) args = dict(data.items()) args["req"] = req - if not spec.keywords: + if not spec[2]: for arg in list(args): - if arg not in spec.args: + if arg not in spec[0]: del args[arg] return callable(**args) return wrapper