I had the same problem once. It turned out that I had called
manage_setLocalRoles with a tuple instead of a list, but as you found
out some code expects all local roles to be stored as the same sequence
type, and Role.manage_addLocalRoles enforces the invariant that a
changed role is stored as a list.

I think manage_setLocalRoles should be changed to enforce that
invariant.

Florent

Christian Theune  <[EMAIL PROTECTED]> wrote:
> Hi.
> 
> I get smacked by this:
> 
> [...long traceback...]
> 
>     * Module Products.CMFCore.CatalogTool, line 58, in allowedRolesAndUsers
>     * Module Products.CMFCore.utils, line 200, in _mergedLocalRoles
> 
>     Exception Value  can only concatenate tuple (not "list") to tuple
> 
> The file tells me nothing special. I once fixed it by using 
> 
>     merged[k] = tuple(merged[k]) + tuple(v)
> 
> instead of
> 
>     
>     merged[k] = merged[k] + v
> 
> I don't know if i triggered something bad before, but this code seems to
> be somewhat ... instable ... so maybe forcing it into a tuple maybe a
> good thing.
-- 
Florent Guillaume, Nuxeo (Paris, France)
+33 1 40 33 79 87  http://nuxeo.com  mailto:[EMAIL PROTECTED]

_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to