[Zope-Checkins]
SVN: Zope/trunk/lib/python/Products/PluginIndexes/DateIndex/DateIndex.py
Recreate the BTrees.Length.Length instance on a clear,
like UnIndex-based
Martijn Pieters
mj at zopatista.com
Wed Nov 30 06:26:29 EST 2005
Log message for revision 40426:
Recreate the BTrees.Length.Length instance on a clear, like UnIndex-based
indexes do; this way one can simply re-catalog a site upgraded from a Zope 2.7
instance.
Changed:
U Zope/trunk/lib/python/Products/PluginIndexes/DateIndex/DateIndex.py
-=-
Modified: Zope/trunk/lib/python/Products/PluginIndexes/DateIndex/DateIndex.py
===================================================================
--- Zope/trunk/lib/python/Products/PluginIndexes/DateIndex/DateIndex.py 2005-11-30 07:01:03 UTC (rev 40425)
+++ Zope/trunk/lib/python/Products/PluginIndexes/DateIndex/DateIndex.py 2005-11-30 11:26:29 UTC (rev 40426)
@@ -20,6 +20,7 @@
from datetime import tzinfo, timedelta
from types import StringType, FloatType, IntType
+import BTrees.Length
from BTrees.IIBTree import IISet, union, intersection, multiunion
from BTrees.IOBTree import IOBTree
from BTrees.OIBTree import OIBTree
@@ -111,7 +112,7 @@
""" Complete reset """
self._index = IOBTree()
self._unindex = OIBTree()
- self._length.set(0)
+ self._length = BTrees.Length.Length()
def index_object( self, documentId, obj, threshold=None ):
"""index an object, normalizing the indexed value to an integer
More information about the Zope-Checkins
mailing list