Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
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
Hugo Ricateau
erp5
Commits
10c717d3
Commit
10c717d3
authored
May 30, 2012
by
Vincent Pelletier
Committed by
Sebastien Robin
Aug 07, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Drop unused/redundant locals.
parent
1bf1db53
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
product/ERP5Type/BTreeData.py
product/ERP5Type/BTreeData.py
+2
-6
No files found.
product/ERP5Type/BTreeData.py
View file @
10c717d3
...
@@ -36,10 +36,9 @@ class BTreeData(Persistent):
...
@@ -36,10 +36,9 @@ class BTreeData(Persistent):
assert
lower_key
==
offset
,
(
lower_key
,
offset
)
assert
lower_key
==
offset
,
(
lower_key
,
offset
)
key
=
lower_key
key
=
lower_key
buf_offset
=
0
buf_offset
=
0
actual_buf_len
=
len
(
buf
)
to_apply
=
{}
to_apply
=
{}
for
next_key
in
tree
.
iterkeys
(
key
):
for
next_key
in
tree
.
iterkeys
(
key
):
if
buf_offset
>=
actual_
buf_len
:
if
buf_offset
>=
buf_len
:
break
break
next_buf_offset
=
buf_offset
+
(
next_key
-
key
)
next_buf_offset
=
buf_offset
+
(
next_key
-
key
)
to_apply
[
key
]
=
PersistentString
(
buf
[
buf_offset
:
next_buf_offset
])
to_apply
[
key
]
=
PersistentString
(
buf
[
buf_offset
:
next_buf_offset
])
...
@@ -63,11 +62,9 @@ class BTreeData(Persistent):
...
@@ -63,11 +62,9 @@ class BTreeData(Persistent):
except
ValueError
:
except
ValueError
:
return
''
return
''
else
:
else
:
last_key
=
key
iterator
=
tree
.
iterkeys
(
key
)
offset
-=
key
offset
-=
key
written
=
0
written
=
0
for
key
in
iterator
:
for
key
in
tree
.
iterkeys
(
key
)
:
padding
=
min
(
size
,
key
-
start_offset
-
written
)
padding
=
min
(
size
,
key
-
start_offset
-
written
)
if
padding
:
if
padding
:
write
(
'
\
x00
'
*
padding
)
write
(
'
\
x00
'
*
padding
)
...
@@ -83,7 +80,6 @@ class BTreeData(Persistent):
...
@@ -83,7 +80,6 @@ class BTreeData(Persistent):
size
-=
to_write_len
size
-=
to_write_len
written
+=
to_write_len
written
+=
to_write_len
offset
=
0
offset
=
0
last_key
=
key
return
result
.
getvalue
()
return
result
.
getvalue
()
def
truncate
(
self
,
offset
):
def
truncate
(
self
,
offset
):
...
...
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