[Zodb-checkins] CVS: ZODB3/BDBStorage - BDBFullStorage.py:1.71

Barry Warsaw barry at zope.com
Fri May 30 14:36:08 EDT 2003


Update of /cvs-repository/ZODB3/BDBStorage
In directory cvs.zope.org:/tmp/cvs-serv8120

Modified Files:
	BDBFullStorage.py 
Log Message:
getSerial(): Raise a KeyError if the object referenced by oid has been
uncreated.


=== ZODB3/BDBStorage/BDBFullStorage.py 1.70 => 1.71 ===
--- ZODB3/BDBStorage/BDBFullStorage.py:1.70	Tue Apr  8 15:25:52 2003
+++ ZODB3/BDBStorage/BDBFullStorage.py	Fri May 30 13:36:07 2003
@@ -1053,6 +1053,10 @@
         self._lock_acquire()
         try:
             serial, tid = self._getSerialAndTid(oid)
+            # See if the object has been uncreated
+            lrevid = unpack('>8s', self._metadata[oid+tid][16:24])[0]
+            if lrevid == DNE:
+                raise KeyError
             return serial
         finally:
             self._lock_release()




More information about the Zodb-checkins mailing list