[Zope-Checkins] CVS: Zope/lib/python/Products/ZCTextIndex - ZCTextIndex.py:1.35.2.6

Chris McDonough chrism@zope.com
Fri, 28 Feb 2003 17:19:23 -0500


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

Modified Files:
      Tag: Zope-2_6-branch
	ZCTextIndex.py 
Log Message:
Fix small bug when attempting to index the results of a callable.  We should not attempt to index None.


=== Zope/lib/python/Products/ZCTextIndex/ZCTextIndex.py 1.35.2.5 => 1.35.2.6 ===
--- Zope/lib/python/Products/ZCTextIndex/ZCTextIndex.py:1.35.2.5	Tue Jan 28 10:49:45 2003
+++ Zope/lib/python/Products/ZCTextIndex/ZCTextIndex.py	Fri Feb 28 17:19:22 2003
@@ -155,6 +155,8 @@
             return 0
         if callable(text):
             text = text()
+        if text is None:
+            return 0
         count = self.index.index_doc(docid, text)
         self._p_changed = 1 # XXX
         return count