[mod_python] Does the Request object have a member called 'name'?

Alberto Ruiz al at ruiz.ws
Mon Apr 3 21:17:18 EDT 2006


Thanks for the tip. It didn't work because I couldn't call args[None]
without complaining about the invalid subscriptor,  but I added an if
statement in the for loop to check if the value was None:
if arg==None:continue

Thanks again.

On Mon, 2006-04-03 at 20:38 -0400, Graham Dumpleton wrote:

> I have noticed that sometimes a form key name can be none. Not sure
> if this was a mod_python 2.7.X specific thing or not, but my forms
> code has:
> 
>       # Some strange forms can result in fields where the
>       # key value is None. Wipe this out just in case this
>       # happens as can cause problems later.
> 
>       if args.has_key(None):
>         del args[None]
> 
> You may therefore simply want to ignore case where q.name is None.
> 
> Graham
> 



More information about the Mod_python mailing list