Commit 7cbeac7a authored by Vincent Pelletier's avatar Vincent Pelletier Committed by Sebastien Robin

Drop debugging prints.

parent 43a399f3
......@@ -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)
......
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