diff options
author | Georg Brandl <georg@python.org> | 2006-02-20 20:29:52 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-02-20 20:29:52 (GMT) |
commit | a223d2cb29a27ea25632cfe695401a4ced96ca06 (patch) | |
tree | c4eacc88b7aecad28a2bff5bb25f687f72464859 /Lib/bsddb/__init__.py | |
parent | 9a276172391d186d80797c29ad0a1c32e22ac2d2 (diff) | |
download | cpython-a223d2cb29a27ea25632cfe695401a4ced96ca06.zip cpython-a223d2cb29a27ea25632cfe695401a4ced96ca06.tar.gz cpython-a223d2cb29a27ea25632cfe695401a4ced96ca06.tar.bz2 |
Bug #1210377: close bsddb cursor correctly after NotFoundError.
Diffstat (limited to 'Lib/bsddb/__init__.py')
-rw-r--r-- | Lib/bsddb/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/bsddb/__init__.py b/Lib/bsddb/__init__.py index 4903584..b7bd482 100644 --- a/Lib/bsddb/__init__.py +++ b/Lib/bsddb/__init__.py @@ -191,7 +191,10 @@ class _DBWithCursor(_iter_mixin): c = self.dbc self.dbc = None if save: - self.saved_dbc_key = c.current(0,0,0)[0] + try: + self.saved_dbc_key = c.current(0,0,0)[0] + except db.DBError: + pass c.close() del c for cref in self._cursor_refs.values(): |