Commit 173240d6 authored by Gregory P. Smith's avatar Gregory P. Smith

fix to work on python <= 2.1

parent c6305503
...@@ -72,13 +72,13 @@ class JoinTestCase(unittest.TestCase): ...@@ -72,13 +72,13 @@ class JoinTestCase(unittest.TestCase):
# create and populate primary index # create and populate primary index
priDB = db.DB(self.env) priDB = db.DB(self.env)
priDB.open(self.filename, "primary", db.DB_BTREE, db.DB_CREATE) priDB.open(self.filename, "primary", db.DB_BTREE, db.DB_CREATE)
map(lambda t: apply(priDB.put, t), ProductIndex) map(lambda t, priDB=priDB: apply(priDB.put, t), ProductIndex)
# create and populate secondary index # create and populate secondary index
secDB = db.DB(self.env) secDB = db.DB(self.env)
secDB.set_flags(db.DB_DUP | db.DB_DUPSORT) secDB.set_flags(db.DB_DUP | db.DB_DUPSORT)
secDB.open(self.filename, "secondary", db.DB_BTREE, db.DB_CREATE) secDB.open(self.filename, "secondary", db.DB_BTREE, db.DB_CREATE)
map(lambda t: apply(secDB.put, t), ColorIndex) map(lambda t, secDB=secDB: apply(secDB.put, t), ColorIndex)
sCursor = None sCursor = None
jCursor = None jCursor = None
......
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