]> granicus.if.org Git - python/commitdiff
fix to work on python <= 2.1
authorGregory P. Smith <greg@mad-scientist.com>
Wed, 9 Jul 2003 05:33:14 +0000 (05:33 +0000)
committerGregory P. Smith <greg@mad-scientist.com>
Wed, 9 Jul 2003 05:33:14 +0000 (05:33 +0000)
Lib/bsddb/test/test_join.py

index 08784aceb157f5feddb0e5c86fa66d4eb3da646a..f434c541b2289c3f3c364f190dcdf3a8c143d174 100644 (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