[Zope-dev] CMF, CMFCore/utils.py, Tuple/List incompatibility

Christian Theune ct@gocept.com
Mon, 18 Nov 2002 22:51:35 +0100


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.

Cheers
Christian

-- 
Christian Theune - ct@gocept.com
gocept gmbh & co.kg - schalaunische strasse 6 - 06366 koethen/anhalt
tel.+49 3641 511586 - fax.+49 3496 3099118 - mob. +49 179 7808366

reduce(lambda x,y:x+y,[chr(ord(x)^42) for x in 'zS^BED\nX_FOY\x0b'])