[Zodb-checkins] CVS: Zope3/src/zodb/storage - memory.py:1.4

Barry Warsaw barry at zope.com
Fri May 16 18:42:55 EDT 2003


Update of /cvs-repository/Zope3/src/zodb/storage
In directory cvs.zope.org:/tmp/cvs-serv22054

Modified Files:
	memory.py 
Log Message:
FakeBTree.delete(): Only use the cursor delete when both key is None
(i.e. not given) and self._pos is set.  Fixes the packing test for
minimal memory storage.


=== Zope3/src/zodb/storage/memory.py 1.3 => 1.4 ===
--- Zope3/src/zodb/storage/memory.py:1.3	Thu May  1 15:35:00 2003
+++ Zope3/src/zodb/storage/memory.py	Fri May 16 17:42:55 2003
@@ -245,7 +245,7 @@
         return self._getrec(i)
 
     def delete(self, key=None, txn=None):
-        if self._pos is not None:
+        if key is None and self._pos is not None:
             # We're doing a cursor delete
             del self._keys[self._pos]
             del self._vals[self._pos]




More information about the Zodb-checkins mailing list