Gramps -L: cleanup, standardize
This commit is contained in:
parent
cf5d847c32
commit
f7e9a34a10
@ -155,8 +155,7 @@ class CLIDbManager(object):
|
|||||||
dbid_path = os.path.join(dirpath, "database.txt")
|
dbid_path = os.path.join(dirpath, "database.txt")
|
||||||
if os.path.isfile(dbid_path):
|
if os.path.isfile(dbid_path):
|
||||||
dbid = open(dbid_path).read().strip()
|
dbid = open(dbid_path).read().strip()
|
||||||
lock_path = os.path.join(dirpath, "lock")
|
if not self.is_locked(dirpath):
|
||||||
if not os.path.isfile(lock_path):
|
|
||||||
try:
|
try:
|
||||||
database = self.dbstate.make_database(dbid)
|
database = self.dbstate.make_database(dbid)
|
||||||
database.load(dirpath, None)
|
database.load(dirpath, None)
|
||||||
@ -165,7 +164,7 @@ class CLIDbManager(object):
|
|||||||
except Exception as msg:
|
except Exception as msg:
|
||||||
retval = {_("Unavailable"): str(msg)[:74] + "..."}
|
retval = {_("Unavailable"): str(msg)[:74] + "..."}
|
||||||
else:
|
else:
|
||||||
retval = {_("Locked?"): "True"}
|
retval = {_("Unavailable"): "locked"}
|
||||||
retval.update({_("Family Tree"): name,
|
retval.update({_("Family Tree"): name,
|
||||||
_("Path"): dirpath,
|
_("Path"): dirpath,
|
||||||
_("Database backend"): dbid,
|
_("Database backend"): dbid,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user