[Zope-Checkins] SVN: Zope/branches/Zope-2_8-branch/ - Catalog.clear(): fixed handling of _length attribute (caused import

Andreas Jung andreas at andreas-jung.com
Tue Aug 16 06:05:19 EDT 2005


Log message for revision 37949:
        - Catalog.clear(): fixed handling of _length attribute (caused import
          problems for some .zexp files e.g. Squishdot instances)
  

Changed:
  U   Zope/branches/Zope-2_8-branch/doc/CHANGES.txt
  U   Zope/branches/Zope-2_8-branch/lib/python/Products/ZCatalog/Catalog.py

-=-
Modified: Zope/branches/Zope-2_8-branch/doc/CHANGES.txt
===================================================================
--- Zope/branches/Zope-2_8-branch/doc/CHANGES.txt	2005-08-15 21:09:34 UTC (rev 37948)
+++ Zope/branches/Zope-2_8-branch/doc/CHANGES.txt	2005-08-16 10:05:19 UTC (rev 37949)
@@ -26,6 +26,9 @@
 
     Bugs Fixed
 
+      - Catalog.clear(): fixed handling of _length attribute (caused import
+        problems for some .zexp files e.g. Squishdot instances)
+
   Zope 2.8.1 (2005/08/11)
 
     Features added

Modified: Zope/branches/Zope-2_8-branch/lib/python/Products/ZCatalog/Catalog.py
===================================================================
--- Zope/branches/Zope-2_8-branch/lib/python/Products/ZCatalog/Catalog.py	2005-08-15 21:09:34 UTC (rev 37948)
+++ Zope/branches/Zope-2_8-branch/lib/python/Products/ZCatalog/Catalog.py	2005-08-16 10:05:19 UTC (rev 37949)
@@ -78,7 +78,6 @@
         # object unique identifier to the rid, and self.paths is a
         # mapping of the rid to the unique identifier.
 
-        self._length = BTrees.Length.Length()
         self.clear()
 
         if brains is not None:
@@ -103,7 +102,7 @@
         self.data  = IOBTree()  # mapping of rid to meta_data
         self.uids  = OIBTree()  # mapping of uid to rid
         self.paths = IOBTree()  # mapping of rid to uid
-        self._length.set(0)
+        self._length = BTrees.Length.Length()
 
         for index in self.indexes.keys():
             self.getIndex(index).clear()



More information about the Zope-Checkins mailing list