[Zope-CMF] addActionProvider
Thomas Olsen
tol@tanghus.dk
Tue, 27 Aug 2002 10:24:34 +0200
When trying to add an actionProvider (CMF-1_3-release from cvs) I get:
Error Type: TypeError
Error Value: can only concatenate list (not "tuple") to list
Products.CMFCore.ActionsTool, line 142, in addActionProvider
addActionProvider currently looks like this:
def addActionProvider( self, provider_name ):
""" add the name of a new action provider """
if hasattr( self, provider_name ):
p_old =3D self.action_providers
p_new =3D p_old + ( provider_name, )
self.action_providers =3D p_new
Shouldn't it be:
def addActionProvider( self, provider_name ):
""" add the name of a new action provider """
if hasattr( self, provider_name ) \
and not provider_name in self.action_providers:
p_old =3D self.action_providers
p_new =3D p_old.append(provider_name)
self.action_providers =3D p_new
--=20
Regards,
=09Thomas Olsen