[Zope-Checkins] CVS: Products/PluginIndexes/DateRangeIndex - DateRangeIndex.py:1.6.2.5

Andreas Jung andreas at andreas-jung.com
Fri Mar 18 10:31:03 EST 2005


Update of /cvs-repository/Products/PluginIndexes/DateRangeIndex
In directory cvs.zope.org:/tmp/cvs-serv2338/lib/python/Products/PluginIndexes/DateRangeIndex

Modified Files:
      Tag: Zope-2_7-branch
	DateRangeIndex.py 
Log Message:

      - DateIndex/DateRangeIndexes did not reset their __len__ attribute
        properly when cleared 


=== Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py 1.6.2.4 => 1.6.2.5 ===
--- Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py:1.6.2.4	Tue Nov  4 17:10:50 2003
+++ Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py	Fri Mar 18 10:31:02 2005
@@ -23,6 +23,7 @@
 from Products.PluginIndexes.common import safe_callable
 from OFS.SimpleItem import SimpleItem
 
+import BTrees.Length
 from BTrees.IOBTree import IOBTree
 from BTrees.IIBTree import IISet, IITreeSet, union, intersection, multiunion
 
@@ -130,6 +131,8 @@
         """
             Start over fresh.
         """
+        try: self.__len__.set(0)
+        except AttributeError: self.__len__=BTrees.Length.Length()
         self._always        = IITreeSet()
         self._since_only    = IOBTree()
         self._until_only    = IOBTree()



More information about the Zope-Checkins mailing list