[Zope-Checkins] CVS: Zope/lib/python/Products/PluginIndexes/PathIndex - PathIndex.py:1.25.6.7

Sidnei da Silva sidnei@x3ng.com.br
Tue, 17 Jun 2003 14:14:58 -0400


Update of /cvs-repository/Zope/lib/python/Products/PluginIndexes/PathIndex
In directory cvs.zope.org:/tmp/cvs-serv10045/lib/python/Products/PluginIndexes/PathIndex

Modified Files:
      Tag: Zope-2_6-branch
	PathIndex.py 
Log Message:
 - Made all PluginIndexes and ZCTextIndex use 'safe_callable',
        which is aware of extension classes that fill 'tp_callable'
        but don't define '__call__'.

      - Made KeywordIndex be more robust about receiving a value that
        is not a string or an iterable type.

=== Zope/lib/python/Products/PluginIndexes/PathIndex/PathIndex.py 1.25.6.6 => 1.25.6.7 ===
--- Zope/lib/python/Products/PluginIndexes/PathIndex/PathIndex.py:1.25.6.6	Tue May 27 01:02:15 2003
+++ Zope/lib/python/Products/PluginIndexes/PathIndex/PathIndex.py	Tue Jun 17 14:14:27 2003
@@ -15,6 +15,7 @@
 
 from Products.PluginIndexes import PluggableIndex
 from Products.PluginIndexes.common.util import parseIndexRequest
+from Products.PluginIndexes.common import safe_callable
 
 from Globals import Persistent, DTMLFile
 from Acquisition import Implicit
@@ -106,7 +107,7 @@
             f = getattr(obj,self.id)
 
             try:
-                if callable(f): path = f()
+                if safe_callable(f): path = f()
                 else:           path = f
             except:
                 return 0