Bug 003611: delete/undo/delete sequence causes crash

svn: r14389
This commit is contained in:
Gerald Britton 2010-02-15 14:14:35 +00:00
parent 7392cac134
commit cd90261ff0

View File

@ -1312,9 +1312,9 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
cursor.set(name)
if cursor.count() == 1:
i = bisect.bisect(self.surname_list, name)
assert 0 <= i-1 < len(self.surname_list)
del self.surname_list[i-1]
except ValueError:
if 0 <= i-1 < len(self.surname_list):
del self.surname_list[i-1]
except:
pass
finally:
cursor.close()