[Zope-Checkins] CVS: ZODB3/ZODB - BaseStorage.py:1.24.2.3

Jeremy Hylton jeremy@zope.com
Wed, 18 Dec 2002 16:16:42 -0500


Update of /cvs-repository/ZODB3/ZODB
In directory cvs.zope.org:/tmp/cvs-serv7308/ZODB

Modified Files:
      Tag: ZODB3-3_1-branch
	BaseStorage.py 
Log Message:
Merge improvement from ZODB3-fast-restart-branch

Explicitly close iterator.


=== ZODB3/ZODB/BaseStorage.py 1.24.2.2 => 1.24.2.3 ===
--- ZODB3/ZODB/BaseStorage.py:1.24.2.2	Tue Nov 12 15:18:09 2002
+++ ZODB3/ZODB/BaseStorage.py	Wed Dec 18 16:16:41 2002
@@ -265,8 +265,8 @@
             restoring = 1
         else:
             restoring = 0
-        for transaction in other.iterator():
-
+        fiter = other.iterator()
+        for transaction in fiter:
             tid=transaction.tid
             if _ts is None:
                 _ts=TimeStamp(tid)
@@ -299,6 +299,8 @@
 
             self.tpc_vote(transaction)
             self.tpc_finish(transaction)
+
+        fiter.close()
 
 class TransactionRecord:
     """Abstract base class for iterator protocol"""