[Neo-report] r2486 vincent - /trunk/neo/storage/database/btree.py

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Dec 9 13:54:41 CET 2010


Author: vincent
Date: Thu Dec  9 13:54:40 2010
New Revision: 2486

Log:
BTrees doesn't like None keys in lookups.

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 13:54:40 2010
@@ -290,7 +290,10 @@ class BTreeDatabaseManager(DatabaseManag
                         tid = tserial.maxKey(before_tid)
                     except ValueError:
                         tid = None
-            result = tserial.get(tid, None)
+            if tid is None:
+                result = None
+            else:
+                result = tserial.get(tid, None)
             if result:
                 compression, checksum, data, value_serial = result
                 if before_tid is None:




More information about the Neo-report mailing list