[Zodb-checkins] CVS: StandaloneZODB/ZODB - FileStorage.py:1.77.4.6

Barry Warsaw barry@wooz.org
Thu, 24 Jan 2002 15:31:07 -0500


Update of /cvs-repository/StandaloneZODB/ZODB
In directory cvs.zope.org:/tmp/cvs-serv26867

Modified Files:
      Tag: Recovery
	FileStorage.py 
Log Message:
next(): Raise IOError if we try to iterate over a closed iterator.


=== StandaloneZODB/ZODB/FileStorage.py 1.77.4.5 => 1.77.4.6 ===
 
     def next(self, index=0):
+        if self._file is None:
+            # A closed iterator.  XXX: Is IOError the best we can do?  For
+            # now, mimic a read on a closed file.
+            raise IOError, 'iterator is closed'
         file=self._file
         seek=file.seek
         read=file.read