[Zope-CMF] zopefind problem?
Tres Seaver
tseaver@palladion.com
Mon, 04 Jun 2001 06:25:15 -0400
marc lindahl wrote:
> Ug! I have brain damage today!
>
> (Object: FindObjectWithNoName)
> (Info: ((<PortalFolder instance at 8a683f0>,), {}, None))
> File /usr/local/zope/Zope-2.3.1/Extensions/zopefind_test.py, line 6, in
> FindObjectWithNoName
> (Object: Traversable)
> TypeError: not enough arguments; expected 2, got 1
This is my bad: ZopeFind needs a mandatory second argument, which
can be defaulted to self:
>>for id, obj in self.ZopeFind():
Should be:
for id, obj in self.ZopeFind( self ):
>>if not hasattr( aq_base( obj ), 'getId' ):
>>nameless.append( id )
>>return string.join( nameless, '\n' )
Tres.
--
===============================================================
Tres Seaver tseaver@digicool.com
Digital Creations "Zope Dealers" http://www.zope.org