Commit a223d2cb authored by Georg Brandl's avatar Georg Brandl

Bug #1210377: close bsddb cursor correctly after NotFoundError.

parent 9a276172
......@@ -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():
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment