mirror of https://github.com/python/cpython
Bug #1210377: close bsddb cursor correctly after NotFoundError.
This commit is contained in:
parent
9a27617239
commit
a223d2cb29
|
@ -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():
|
||||
|
|
Loading…
Reference in New Issue