Commit 6b53fd26 authored by Jeremy Hylton's avatar Jeremy Hylton

Explicitly close the FileIterator.

parent 8c199636
......@@ -38,7 +38,8 @@ def get_pickle_metadata(data):
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 @@ def fsdump(path, file=None, with_offset=1):
j += 1
print >> file
i += 1
iter.close()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment