X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=wrw%2Futil.py;h=2e3a7954bc53877705facd1d8de6234af045d94a;hb=refs%2Fheads%2Fjython;hp=d7b52cb17fbae633c5ed4bee2c161d606ef82aaf;hpb=df5f786840523bc4faf8e0f2168df0d3b2638473;p=wrw.git diff --git a/wrw/util.py b/wrw/util.py index d7b52cb..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 @@ -174,7 +175,6 @@ class specdirty(sessiondata): ss = specslot.slist(self) for i, nm in enumerate(type(self).__sslots_a__): bound, val = st.pop(nm, (False, None)) - print i, nm, bound, val if not bound: ss[i] = specslot.unbound else: