On Sep 18, 2:35 am, gert <gert.cuyk...@gmail.com> wrote: > On Sep 18, 2:11 am, Chris Rebert <c...@rebertia.com> wrote: > > > > > On Thu, Sep 17, 2009 at 5:03 PM, gert <gert.cuyk...@gmail.com> wrote: > > > <snip> > > > > So far i have this > > >http://code.google.com/p/appwsgi/source/browse/appwsgi/wsgi/appointme... > > > > I have 3 problems left Any_GID, Everybody_no_GID, > > > Just add entries to the dictionary with the same function as value but > > all permutations of GID as part of their keys? > > > > and when no key > > > found do return > > > try: > > func[(v['cmd'], s.GID)](db, v, s.UID, s.GID) > > except KeyError: > > return text(response,'{"error":"session expired"}') > > I edited the code again, this should work I think except for the None > maybe ? > I just have to make sure every user or admin is also in the guest > group.
Works perfect thanks :) Maybe I will add some lamba stuf to make it a bit more compact but looks better now then the elif version -- http://mail.python.org/mailman/listinfo/python-list