From fbf3835ca08b62a7329d156b5264793329733c40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Rapinat?= Date: Fri, 24 Oct 2014 09:48:13 +0200 Subject: [PATCH] 8122: DB lock not checked when opening database from the recent opened trees --- gramps/cli/grampscli.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/gramps/cli/grampscli.py b/gramps/cli/grampscli.py index b77daef18..66b834af0 100644 --- a/gramps/cli/grampscli.py +++ b/gramps/cli/grampscli.py @@ -248,6 +248,13 @@ class CLIManager(object): _("Family Tree does not exist, as it has been deleted.")) return + if os.path.isfile(os.path.join(filename, "lock")): + self._errordialog( + _("The database is locked."), + _("Use the --force-unlock option if you are sure " + "that the database is not in use.")) + return + if self.db_loader.read_file(filename): # Attempt to figure out the database title path = os.path.join(filename, "name.txt")