From dfa46b7af446bb5a6936ba0061290d95ccdb0b74 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Thu, 21 Jun 2007 04:55:26 +0000 Subject: [PATCH] 2007-06-20 Don Allingham * src/DbManager.py: Catch the icons properly * src/GrampsDb/_GrampsDBDir.py: catch error on lock file deletion svn: r8617 --- ChangeLog | 4 ++++ src/DbManager.py | 3 ++- src/GrampsDb/_GrampsDBDir.py | 5 ++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 558297baf..0baf3d2b3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-06-20 Don Allingham + * src/DbManager.py: Catch the icons properly + * src/GrampsDb/_GrampsDBDir.py: catch error on lock file deletion + 2007-06-20 Alex Roitman * src/Config/_GrampsConfigKeys.py: Correctly regenerate. * src/DbManager.py (__rcs): Typo. diff --git a/src/DbManager.py b/src/DbManager.py index 4db817ad3..ec9860bc9 100644 --- a/src/DbManager.py +++ b/src/DbManager.py @@ -192,7 +192,7 @@ class DbManager: self.rcs.set_label(_("Archive")) self.rename.set_sensitive(True) - if store.get_value(node, OPEN_COL): + if store.get_value(node, STOCK_COL) == gtk.STOCK_OPEN: self.connect.set_sensitive(False) if _rcs_found: self.rcs.show() @@ -202,6 +202,7 @@ class DbManager: self.rcs.show() else: self.rcs.hide() + if store.get_value(node, STOCK_COL) == gtk.STOCK_DIALOG_ERROR: path = store.get_value(node, PATH_COL) if os.path.isfile(os.path.join(path,"person.gbkp")): diff --git a/src/GrampsDb/_GrampsDBDir.py b/src/GrampsDb/_GrampsDBDir.py index 1991ee197..8ace96d19 100644 --- a/src/GrampsDb/_GrampsDBDir.py +++ b/src/GrampsDb/_GrampsDBDir.py @@ -1729,7 +1729,10 @@ def _mkname(path, name): return os.path.join(path, name + ".db") def clear_lock_file(name): - os.unlink(os.path.join(name, "lock")) + try: + os.unlink(os.path.join(name, "lock")) + except OSError: + return def write_lock_file(name): f = open(os.path.join(name, "lock"), "w")