diff options
-rw-r--r-- | Lib/bsddb/__init__.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Lib/bsddb/__init__.py b/Lib/bsddb/__init__.py index 4903584..b7bd482 100644 --- a/Lib/bsddb/__init__.py +++ b/Lib/bsddb/__init__.py @@ -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(): |