[Zodb-checkins] CVS: StandaloneZODB/ZODB - fsdump.py:1.3
Jeremy Hylton
jeremy@zope.com
Mon, 11 Feb 2002 14:38:10 -0500
Update of /cvs-repository/StandaloneZODB/ZODB
In directory cvs.zope.org:/tmp/cvs-serv22161
Modified Files:
fsdump.py
Log Message:
Explicitly close the FileIterator.
=== StandaloneZODB/ZODB/fsdump.py 1.2 => 1.3 ===
def fsdump(path, file=None, with_offset=1):
i = 0
- for trans in FileIterator(path):
+ iter = FileIterator(path)
+ for trans in iter:
if with_offset:
print >> file, "Trans #%05d tid=%016x time=%s offset=%d" % \
(i, U64(trans.tid), str(TimeStamp(trans.tid)), trans._pos)
@@ -68,4 +69,4 @@
j += 1
print >> file
i += 1
-
+ iter.close()