[Zope-CVS] CVS: Products/FieldedTextIndex - index.py:1.2
Casey Duncan
casey at zope.com
Wed Dec 10 00:02:34 EST 2003
Update of /cvs-repository/Products/FieldedTextIndex
In directory cvs.zope.org:/tmp/cvs-serv18437
Modified Files:
index.py
Log Message:
Add check for empty source when indexing
=== Products/FieldedTextIndex/index.py 1.1.1.1 => 1.2 ===
--- Products/FieldedTextIndex/index.py:1.1.1.1 Mon Dec 8 01:25:00 2003
+++ Products/FieldedTextIndex/index.py Wed Dec 10 00:02:32 2003
@@ -113,11 +113,12 @@
except (TypeError, AttributeError):
pass
self.unindex_object(docid)
+ if not source:
+ return 0
frequencies = {}
freq_get = frequencies.get
lexicon = self._lexicon
field_wids = {}
-
# Get wids for each field and total word frequencies for the whole doc
for fname, text in source:
fieldid = self._field_id(fname)
More information about the Zope-CVS
mailing list