summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb/dbtables.py
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2003-07-09 04:45:59 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2003-07-09 04:45:59 (GMT)
commit455d46f0d921337405ebd3a098c210f3614ae77c (patch)
treea76c243123743366b91a85ccd060e40d4d8a9a5a /Lib/bsddb/dbtables.py
parentbea57c6c355ba98cd9019d13e5adf7d715377edf (diff)
downloadcpython-455d46f0d921337405ebd3a098c210f3614ae77c.zip
cpython-455d46f0d921337405ebd3a098c210f3614ae77c.tar.gz
cpython-455d46f0d921337405ebd3a098c210f3614ae77c.tar.bz2
bsddb 4.1.6:
* Extended DB & DBEnv set_get_returns_none functionality to take a "level" instead of a boolean flag. The boolean 0 and 1 values still have the same effect. A value of 2 extends the "return None instead of raising an exception" behaviour to the DBCursor set methods. This will become the default behaviour in pybsddb 4.2. * Fixed a typo in DBCursor.join_item method that made it crash instead of returning a value. Obviously nobody uses it. Wrote a test case for join and join_item.
Diffstat (limited to 'Lib/bsddb/dbtables.py')
-rw-r--r--Lib/bsddb/dbtables.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/bsddb/dbtables.py b/Lib/bsddb/dbtables.py
index 85dbb4a..d052ca5 100644
--- a/Lib/bsddb/dbtables.py
+++ b/Lib/bsddb/dbtables.py
@@ -155,6 +155,9 @@ class bsdTableDB :
if truncate:
myflags |= DB_TRUNCATE
self.db = DB(self.env)
+ # this code relies on DBCursor.set* methods to raise exceptions
+ # rather than returning None
+ self.db.set_get_returns_none(1)
# allow duplicate entries [warning: be careful w/ metadata]
self.db.set_flags(DB_DUP)
self.db.open(filename, DB_BTREE, dbflags | myflags, mode)