summaryrefslogtreecommitdiffstats
path: root/Lib/bsddb/__init__.py
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2004-01-13 19:59:57 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2004-01-13 19:59:57 (GMT)
commite33aef7b159a24789cfa8f1fcf4462f6a4bab464 (patch)
treeeee65a344b751d46bf3bbd00ea49582a19f15f4f /Lib/bsddb/__init__.py
parent2fb702966c9c7e29c2697cf0d9dc6b1a19e465d7 (diff)
downloadcpython-e33aef7b159a24789cfa8f1fcf4462f6a4bab464.zip
cpython-e33aef7b159a24789cfa8f1fcf4462f6a4bab464.tar.gz
cpython-e33aef7b159a24789cfa8f1fcf4462f6a4bab464.tar.bz2
__init__.py: keep it compatible with older python (True and False == 1 and 0)
test_basics.py: updated for the set_get_returns_none() default of 2 change.
Diffstat (limited to 'Lib/bsddb/__init__.py')
-rw-r--r--Lib/bsddb/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/bsddb/__init__.py b/Lib/bsddb/__init__.py
index 99499c5..9c59b00 100644
--- a/Lib/bsddb/__init__.py
+++ b/Lib/bsddb/__init__.py
@@ -184,7 +184,7 @@ class _DBWithCursor(_iter_mixin):
# BerkeleyDB deadlocks (due to being opened with DB_INIT_LOCK
# and DB_THREAD to be thread safe) when intermixing database
# operations that use the cursor internally with those that don't.
- def _closeCursors(self, save=True):
+ def _closeCursors(self, save=1):
if self.dbc:
c = self.dbc
self.dbc = None
@@ -223,7 +223,7 @@ class _DBWithCursor(_iter_mixin):
del self.db[key]
def close(self):
- self._closeCursors(save=False)
+ self._closeCursors(save=0)
if self.dbc is not None:
self.dbc.close()
v = 0