Gramps -L: cleanup, standardize

This commit is contained in:
Doug Blank 2015-07-18 17:59:46 -04:00
parent cf5d847c32
commit f7e9a34a10

View File

@ -155,8 +155,7 @@ class CLIDbManager(object):
dbid_path = os.path.join(dirpath, "database.txt")
if os.path.isfile(dbid_path):
dbid = open(dbid_path).read().strip()
lock_path = os.path.join(dirpath, "lock")
if not os.path.isfile(lock_path):
if not self.is_locked(dirpath):
try:
database = self.dbstate.make_database(dbid)
database.load(dirpath, None)
@ -165,7 +164,7 @@ class CLIDbManager(object):
except Exception as msg:
retval = {_("Unavailable"): str(msg)[:74] + "..."}
else:
retval = {_("Locked?"): "True"}
retval = {_("Unavailable"): "locked"}
retval.update({_("Family Tree"): name,
_("Path"): dirpath,
_("Database backend"): dbid,