elif alternative

gert gert.cuykens at gmail.com
Thu Sep 17 20:35:29 EDT 2009


On Sep 18, 2:11 am, Chris Rebert <c... at rebertia.com> wrote:
> On Thu, Sep 17, 2009 at 5:03 PM, gert <gert.cuyk... at 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.



More information about the Python-list mailing list