[Zope-Checkins] CVS: Zope/lib/python/Products/ZCatalog - Catalog.py:1.98.6.5

Andreas Jung andreas@andreas-jung.com
Fri, 17 Jan 2003 11:59:29 -0500


Update of /cvs-repository/Zope/lib/python/Products/ZCatalog
In directory cvs.zope.org:/tmp/cvs-serv19168/lib/python/Products/ZCatalog

Modified Files:
      Tag: Zope-2_6-branch
	Catalog.py 
Log Message:
Collector #771: ZCatalog failed to index DTML Document if the name
of a catalog metadata was identical with the name of an acquired 
object.


=== Zope/lib/python/Products/ZCatalog/Catalog.py 1.98.6.4 => 1.98.6.5 ===
--- Zope/lib/python/Products/ZCatalog/Catalog.py:1.98.6.4	Tue Dec 24 11:37:06 2002
+++ Zope/lib/python/Products/ZCatalog/Catalog.py	Fri Jan 17 11:59:26 2003
@@ -22,7 +22,7 @@
 
 from Lazy import LazyMap, LazyFilter, LazyCat, LazyValues
 from CatalogBrains import AbstractCatalogBrain, NoBrainer
-
+from DocumentTemplate import cDocumentTemplate
 from BTrees.IIBTree import intersection, weightedIntersection, IISet
 from BTrees.OIBTree import OIBTree
 from BTrees.IOBTree import IOBTree
@@ -401,7 +401,7 @@
         # the unique id is allways the first element
         for x in self.names:
             attr=getattr(object, x, MV)
-            if(attr is not MV and callable(attr)): attr=attr()
+            if(attr is not MV and cDocumentTemplate.safe_callable(attr)): attr=attr()
             record.append(attr)
         return tuple(record)