Bug #1210377: close bsddb cursor correctly after NotFoundError.

This commit is contained in:
Georg Brandl 2006-02-20 20:29:52 +00:00
parent 9a27617239
commit a223d2cb29
1 changed files with 4 additions and 1 deletions

View File

@ -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():