[Zope-Checkins] CVS: Zope/lib/python/Products/ZCTextIndex - ZCTextIndex.py:1.35.2.8
Sidnei da Silva
sidnei@x3ng.com.br
Tue, 17 Jun 2003 14:14:29 -0400
Update of /cvs-repository/Zope/lib/python/Products/ZCTextIndex
In directory cvs.zope.org:/tmp/cvs-serv10045/lib/python/Products/ZCTextIndex
Modified Files:
Tag: Zope-2_6-branch
ZCTextIndex.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/ZCTextIndex/ZCTextIndex.py 1.35.2.7 => 1.35.2.8 ===
--- Zope/lib/python/Products/ZCTextIndex/ZCTextIndex.py:1.35.2.7 Thu Jun 5 16:37:04 2003
+++ Zope/lib/python/Products/ZCTextIndex/ZCTextIndex.py Tue Jun 17 14:14:28 2003
@@ -30,6 +30,7 @@
from Products.PluginIndexes.common.PluggableIndex import \
PluggableIndexInterface
from Products.PluginIndexes.common.util import parseIndexRequest
+from Products.PluginIndexes.common import safe_callable
from Products.ZCTextIndex.ILexicon import ILexicon
from Products.ZCTextIndex.Lexicon import \
@@ -153,7 +154,7 @@
text = getattr(obj, self._fieldname, None)
if text is None:
return 0
- if callable(text):
+ if safe_callable(text):
text = text()
if text is None:
return 0