Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Leo Le Bouter
erp5
Commits
ab1d6229
Commit
ab1d6229
authored
12 years ago
by
Vincent Pelletier
Committed by
Sebastien Robin
10 years ago
Browse files
Options
Download
Email Patches
Plain Diff
Delay StringIO creation until actually needed.
parent
10c717d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
product/ERP5Type/BTreeData.py
product/ERP5Type/BTreeData.py
+2
-2
No files found.
product/ERP5Type/BTreeData.py
View file @
ab1d6229
...
...
@@ -55,14 +55,14 @@ class BTreeData(Persistent):
def
read
(
self
,
offset
,
size
):
start_offset
=
offset
tree
=
self
.
tree
result
=
StringIO
()
write
=
result
.
write
try
:
key
=
tree
.
maxKey
(
offset
)
except
ValueError
:
return
''
else
:
offset
-=
key
result
=
StringIO
()
write
=
result
.
write
written
=
0
for
key
in
tree
.
iterkeys
(
key
):
padding
=
min
(
size
,
key
-
start_offset
-
written
)
...
...
This diff is collapsed.
Click to expand it.
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