[CMF-checkins] CVS: CMF/CMFCore - CMFCatalogAware.py:1.11

Florent Guillaume fg@nuxeo.com
Wed, 24 Jul 2002 08:41:47 -0400


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

Modified Files:
	CMFCatalogAware.py 
Log Message:
Small cleanup of ghostified test.


=== CMF/CMFCore/CMFCatalogAware.py 1.10 => 1.11 ===
             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()