[Zodb-checkins] CVS: ZODB3/ZODB - FileStorage.py:1.126

Barry Warsaw barry@wooz.org
Tue, 4 Feb 2003 12:16:22 -0500


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

Modified Files:
	FileStorage.py 
Log Message:
FileIterator.iterator(): Add this so we can pass iterators to
BaseStorage's copyTransactionsFrom() method's "other" argument.


=== ZODB3/ZODB/FileStorage.py 1.125 => 1.126 ===
--- ZODB3/ZODB/FileStorage.py:1.125	Mon Jan 20 14:11:22 2003
+++ ZODB3/ZODB/FileStorage.py	Tue Feb  4 12:16:19 2003
@@ -2304,6 +2304,13 @@
         # implementation.  So just return 0.
         return 0
 
+    # This allows us to pass an iterator as the `other' argument to
+    # copyTransactionsFrom() in BaseStorage.  The advantage here is that we
+    # can create the iterator manually, e.g. setting start and stop, and then
+    # just let copyTransactionsFrom() do its thing.
+    def iterator(self):
+        return self
+
     def close(self):
         file = self._file
         if file is not None: