[Zope3-checkins] CVS: ZODB4/src/zodb/storage - bdbfull.py:1.12.4.4

Barry Warsaw barry@wooz.org
Wed, 12 Mar 2003 12:53:48 -0500


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

Modified Files:
      Tag: opaque-pickles-branch
	bdbfull.py 
Log Message:
_collect_objs(): the vid->revid entry may not exist.


=== ZODB4/src/zodb/storage/bdbfull.py 1.12.4.3 => 1.12.4.4 ===
--- ZODB4/src/zodb/storage/bdbfull.py:1.12.4.3	Wed Mar 12 12:25:23 2003
+++ ZODB4/src/zodb/storage/bdbfull.py	Wed Mar 12 12:53:47 2003
@@ -1552,8 +1552,12 @@
                     if vid <> ZERO:
                         cv = self._currentVersions.cursor(txn=txn)
                         try:
-                            cv.set_both(vid, revid)
-                            cv.delete()
+                            try:
+                                cv.set_both(vid, revid)
+                            except db.DBNotFoundError:
+                                pass
+                            else:
+                                cv.delete()
                         finally:
                             cv.close()
                     # BAW: maybe we want to refcount vids and versions table