[Zope-CVS] CVS: Products/Ape/lib/apelib/zope2 - ofsserial.py:1.15

Shane Hathaway shane at zope.com
Thu Jul 22 01:53:27 EDT 2004


Update of /cvs-repository/Products/Ape/lib/apelib/zope2
In directory cvs.zope.org:/tmp/cvs-serv30505/lib/apelib/zope2

Modified Files:
	ofsserial.py 
Log Message:
Compatibility with BTreeFolder 1.0


=== Products/Ape/lib/apelib/zope2/ofsserial.py 1.14 => 1.15 ===
--- Products/Ape/lib/apelib/zope2/ofsserial.py:1.14	Wed Jul 21 02:38:05 2004
+++ Products/Ape/lib/apelib/zope2/ofsserial.py	Thu Jul 22 01:53:26 2004
@@ -126,7 +126,12 @@
         assert isinstance(obj, ObjectManager), obj
         btree_folder = self._is_a_btree_folder(obj)
         if btree_folder:
-            obj._initBTrees()
+            if hasattr(obj, '_initBTrees'):
+                # Version 1.0.1+ of BTreeFolder2
+                obj._initBTrees()
+            else:
+                # Crufty workaround for older versions
+                obj.__init__(obj.id)
         for (id, oid, classification) in state:
             subob = event.resolve(id, oid, classification)
             obj._setOb(id, subob)



More information about the Zope-CVS mailing list