mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Bug #1210377: close bsddb cursor correctly after NotFoundError.
This commit is contained in:
@@ -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():
|
||||
|
||||
Reference in New Issue
Block a user