Split Utils in a non GUI and GUI part
move GrampsCfg utils to Utils improve import strategy svn: r12680
This commit is contained in:
@ -23,7 +23,4 @@
|
||||
Package init for the cli package.
|
||||
"""
|
||||
|
||||
from grampscli import startcli, CLIDbLoader, CLIManager
|
||||
from argparser import ArgParser
|
||||
from arghandler import ArgHandler
|
||||
from clidbman import CLIDbManager
|
||||
# DO NOT IMPORT METHODS/CLASSES FROM src/gui HERE ! Only __all__
|
||||
|
@ -439,7 +439,7 @@ class ArgHandler(object):
|
||||
pmgr = PluginManager.get_instance()
|
||||
if action == 'check':
|
||||
import Check
|
||||
checker = Check.CheckIntegrity(self.dbstate.db, None, None)
|
||||
checker = Check.CheckIntegrity(self.dbstate, None, None)
|
||||
checker.check_for_broken_family_links()
|
||||
checker.cleanup_missing_photos(1)
|
||||
checker.check_parent_relationships()
|
||||
@ -448,6 +448,7 @@ class ArgHandler(object):
|
||||
if errs:
|
||||
checker.report(1)
|
||||
elif action == 'summary':
|
||||
## FIXME, this is broken, Summary no longer has build_report !
|
||||
import Summary
|
||||
text = Summary.build_report(self.dbstate.db, None)
|
||||
print text
|
||||
|
@ -53,7 +53,7 @@ import DbState
|
||||
from gen.db import (GrampsDBDir, FileVersionDeclineToUpgrade)
|
||||
import gen.db.exceptions
|
||||
from gen.plug import PluginManager
|
||||
import GrampsCfg
|
||||
from Utils import get_researcher
|
||||
import RecentFiles
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -251,7 +251,7 @@ class CLIManager(object):
|
||||
|
||||
# apply preferred researcher if loaded file has none
|
||||
res = self.dbstate.db.get_researcher()
|
||||
owner = GrampsCfg.get_researcher()
|
||||
owner = get_researcher()
|
||||
if res.get_name() == "" and owner.get_name() != "":
|
||||
self.dbstate.db.set_researcher(owner)
|
||||
|
||||
|
Reference in New Issue
Block a user