[CMF-checkins] CVS: CMF/CMFCore - WorkflowTool.py:1.31

Florent Guillaume fg@nuxeo.com
Sun, 4 Aug 2002 16:16:37 -0400


Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv14629

Modified Files:
	WorkflowTool.py 
Log Message:

When updating role mappings, don't fail if trying to reindex
portal_catalog itself.


=== CMF/CMFCore/WorkflowTool.py 1.30 => 1.31 ===
                 count = count + 1
                 if hasattr(aq_base(ob), 'reindexObject'):
                     # Reindex security-related indexes
-                    ob.reindexObject(idxs=['allowedRolesAndUsers'])
+                    try:
+                        ob.reindexObject(idxs=['allowedRolesAndUsers'])
+                    except TypeError:
+                        # Catch attempts to reindex portal_catalog.
+                        pass
         if hasattr(aq_base(ob), 'objectItems'):
             obs = ob.objectItems()
             if obs: