From cd90261ff0c5ecc6620f7ff19d60d6b324e80a0a Mon Sep 17 00:00:00 2001 From: Gerald Britton Date: Mon, 15 Feb 2010 14:14:35 +0000 Subject: [PATCH] Bug 003611: delete/undo/delete sequence causes crash svn: r14389 --- src/gen/db/write.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gen/db/write.py b/src/gen/db/write.py index 4dd804f1c..dfe643eb3 100644 --- a/src/gen/db/write.py +++ b/src/gen/db/write.py @@ -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()