[Zope] Properties of File objects in python script

Felix Ulrich-Oltean felix@chaptereight.com
Wed, 13 Nov 2002 15:05:18 +0000


On Wed, Nov 13, 2002 at 03:50:44PM +0100, Andreas Tille wrote:
>     name = "<some parameter of the script>"
>     cont = container.content
> 
>     for file in cont.objectValues('File'):
>         if name == file.getId():
>             foundname=name
>             foundfile=file
>             break
> 
>     if foundfile.hasProperty('dynscript') :
>         return foundname.dynscript
> 

Shouldn't the last line say:

return foundfile.dynscript

You are checking whether foundfile has the property 'dynscript', but
the returning foundscript.dynscript

F.