fix to work on python <= 2.1

This commit is contained in:
Gregory P. Smith 2003-07-09 05:33:14 +00:00
parent df35beed40
commit ad30fa03a4
1 changed files with 2 additions and 2 deletions

View File

@ -72,13 +72,13 @@ class JoinTestCase(unittest.TestCase):
# create and populate primary index
priDB = db.DB(self.env)
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
secDB = db.DB(self.env)
secDB.set_flags(db.DB_DUP | db.DB_DUPSORT)
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
jCursor = None