[Neo-report] r2503 gregory - /trunk/neo/storage/database/btree.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Dec 9 18:18:07 CET 2010
Author: gregory
Date: Thu Dec 9 18:18:07 2010
New Revision: 2503
Log:
Don't add an empty dict in result dict
Modified:
trunk/neo/storage/database/btree.py
Modified: trunk/neo/storage/database/btree.py
==============================================================================
--- trunk/neo/storage/database/btree.py [iso-8859-1] (original)
+++ trunk/neo/storage/database/btree.py [iso-8859-1] Thu Dec 9 18:18:07 2010
@@ -574,8 +574,8 @@ class BTreeDatabaseManager(DatabaseManag
result = {}
for oid, tserial in safeIter(self._obj.items, min=min_oid):
if oid % num_partitions == partition:
- result[p64(oid)] = tid_list = []
- append = tid_list.append
+ if length == 0:
+ break
if oid == min_oid:
try:
tid_seq = tserial.keys(min=min_serial, max=max_serial)
@@ -583,6 +583,10 @@ class BTreeDatabaseManager(DatabaseManag
continue
else:
tid_seq = tserial.keys(max=max_serial)
+ if not tid_seq:
+ continue
+ result[p64(oid)] = tid_list = []
+ append = tid_list.append
for tid in tid_seq:
if length == 0:
break
More information about the Neo-report
mailing list