[CMF-checkins] CVS: CMF/CMFCore - CMFCatalogAware.py:1.7.4.3
Florent Guillaume
fg@nuxeo.com
Wed, 24 Jul 2002 08:42:10 -0400
Update of /cvs-repository/CMF/CMFCore
In directory cvs.zope.org:/tmp/cvs-serv31352
Modified Files:
Tag: CMF-1_3-branch
CMFCatalogAware.py
Log Message:
Small cleanup of ghostified test.
=== CMF/CMFCore/CMFCatalogAware.py 1.7.4.2 => 1.7.4.3 ===
path = '/'.join(self.getPhysicalPath())
for brain in catalog.searchResults(path=path):
ob = brain.getObject()
- try: s = ob._p_changed
- except: s = 0
+ s = getattr(ob, '_p_changed', 0)
catalog.reindexObject(ob, idxs=['allowedRolesAndUsers'])
if s is None: ob._p_deactivate()
# Reindex the object itself, as the PathIndex only gave us
@@ -164,8 +163,7 @@
opaque_values = self.opaqueValues()
for subobjects in values, opaque_values:
for ob in subobjects:
- try: s = ob._p_changed
- except: s = 0
+ s = getattr(ob, '_p_changed', 0)
if hasattr(aq_base(ob), name):
getattr(ob, name)(*args)
if s is None: ob._p_deactivate()