mirror of https://github.com/python/cpython.git
Bug #1210377: close bsddb cursor correctly after NotFoundError.
This commit is contained in:
parent
9a27617239
commit
a223d2cb29
|
@ -191,7 +191,10 @@ def _closeCursors(self, save=1):
|
||||||
c = self.dbc
|
c = self.dbc
|
||||||
self.dbc = None
|
self.dbc = None
|
||||||
if save:
|
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()
|
c.close()
|
||||||
del c
|
del c
|
||||||
for cref in self._cursor_refs.values():
|
for cref in self._cursor_refs.values():
|
||||||
|
|
Loading…
Reference in New Issue