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
Klaus Wölfel
erp5
Commits
7cbeac7a
Commit
7cbeac7a
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 debugging prints.
parent
43a399f3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
5 deletions
+0
-5
product/ERP5Type/BTreeData.py
product/ERP5Type/BTreeData.py
+0
-5
No files found.
product/ERP5Type/BTreeData.py
View file @
7cbeac7a
...
...
@@ -32,7 +32,6 @@ class BTreeData(Persistent):
value_len
=
len
(
value
)
if
lower_key
+
value_len
>
offset
:
key
=
lower_key
#print 'Overwriting', key + value_len - offset, 'bytes, copying', offset - key, 'bytes'
buf
=
value
[:
offset
-
key
]
+
buf
else
:
key
=
offset
...
...
@@ -46,21 +45,18 @@ class BTreeData(Persistent):
if
buf_offset
>=
actual_buf_len
:
break
next_buf_offset
=
buf_offset
+
(
next_key
-
key
)
#print 'Offset', offset + buf_offset, 'in key', key, 'with len', next_key - key
to_apply
[
key
]
=
PersistentString
(
buf
[
buf_offset
:
next_buf_offset
])
buf_offset
=
next_buf_offset
key
=
next_key
else
:
to_add
=
buf
[
buf_offset
:]
if
to_add
:
#print 'Offset', offset + buf_offset, 'in own key with len', len(to_add)
tree
[
offset
+
buf_offset
]
=
PersistentString
(
to_add
)
for
key
,
value
in
to_apply
.
iteritems
():
tree
[
key
]
=
value
return
buf_len
def
read
(
self
,
offset
,
size
):
#print 'read', hex(offset), hex(size)
start_offset
=
offset
# start_offset = offset = int(offset)
# assert not isinstance(offset, long), 'Offset is too big for int ' \
...
...
@@ -78,7 +74,6 @@ class BTreeData(Persistent):
offset
-=
key
written
=
0
for
key
in
iterator
:
#print 'key', hex(key)
padding
=
min
(
size
,
key
-
start_offset
-
written
)
if
padding
:
write
(
'
\
x00
'
*
padding
)
...
...
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