[Neo-report] r2464 vincent - /trunk/neo/storage/database/btree.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Wed Nov 17 14:05:24 CET 2010
Author: vincent
Date: Wed Nov 17 14:05:24 2010
New Revision: 2464
Log:
Avoid duplicating return value computation.
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] Wed Nov 17 14:05:24 2010
@@ -638,16 +638,17 @@ class BTreeDatabaseManager(DatabaseManag
max_serial = tserial.maxKey(tid)
except ValueError:
# No entry before pack TID, nothing to pack on this object.
- return False
- if tserial[max_serial][2] == '':
- # Last version before/at pack TID is a creation undo, drop
- # it too.
- max_serial += 1
- def serial_callback(serial, _):
- updatePackFuture(oid, serial, max_serial,
- updateObjectDataForPack)
- batchDelete(tserial, serial_callback,
- iter_kw={'max': max_serial, 'excludemax': True})
+ pass
+ else:
+ if tserial[max_serial][2] == '':
+ # Last version before/at pack TID is a creation undo, drop
+ # it too.
+ max_serial += 1
+ def serial_callback(serial, _):
+ updatePackFuture(oid, serial, max_serial,
+ updateObjectDataForPack)
+ batchDelete(tserial, serial_callback,
+ iter_kw={'max': max_serial, 'excludemax': True})
return not tserial
batchDelete(self._obj, obj_callback, recycle_subtrees=True)
More information about the Neo-report
mailing list