Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZODB
Commits
a6c36f62
Commit
a6c36f62
authored
Feb 11, 2002
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Explicitly close the FileIterator.
parent
79a3d6c0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/ZODB/fsdump.py
src/ZODB/fsdump.py
+3
-2
No files found.
src/ZODB/fsdump.py
View file @
a6c36f62
...
@@ -38,7 +38,8 @@ def get_pickle_metadata(data):
...
@@ -38,7 +38,8 @@ def get_pickle_metadata(data):
def
fsdump
(
path
,
file
=
None
,
with_offset
=
1
):
def
fsdump
(
path
,
file
=
None
,
with_offset
=
1
):
i
=
0
i
=
0
for
trans
in
FileIterator
(
path
):
iter
=
FileIterator
(
path
)
for
trans
in
iter
:
if
with_offset
:
if
with_offset
:
print
>>
file
,
"Trans #%05d tid=%016x time=%s offset=%d"
%
\
print
>>
file
,
"Trans #%05d tid=%016x time=%s offset=%d"
%
\
(
i
,
U64
(
trans
.
tid
),
str
(
TimeStamp
(
trans
.
tid
)),
trans
.
_pos
)
(
i
,
U64
(
trans
.
tid
),
str
(
TimeStamp
(
trans
.
tid
)),
trans
.
_pos
)
...
@@ -68,4 +69,4 @@ def fsdump(path, file=None, with_offset=1):
...
@@ -68,4 +69,4 @@ def fsdump(path, file=None, with_offset=1):
j
+=
1
j
+=
1
print
>>
file
print
>>
file
i
+=
1
i
+=
1
iter
.
close
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment