* src/ArgHandler.py (cl_action): Properly call CLI tool.

* src/plugins/DumpGenderStats.py (__init__): Fix CLI mode.
	* src/PluginUtils/_Tool.py (cli_tool): Fix CLI tools.


svn: r7741
This commit is contained in:
Alex Roitman
2006-12-01 15:48:25 +00:00
parent 685c655b80
commit 4987b9b9b4
5 changed files with 12 additions and 7 deletions

View File

@ -271,9 +271,9 @@ def gui_tool(dbstate, uistate, tool_class, options_class, translated_name,
log.error("Failed to start tool.", exc_info=True)
# Command-line generic task
def cli_tool( database,name,category,tool_class,options_class,options_str_dict):
def cli_tool(dbstate,name,category,tool_class,options_class,options_str_dict):
clt = CommandLineTool(database,name,category,
clt = CommandLineTool(dbstate.db,name,category,
options_class,options_str_dict)
# Exit here if show option was given
@ -282,7 +282,7 @@ def cli_tool( database,name,category,tool_class,options_class,options_str_dict):
# run tool
try:
tool_class(database,clt.person,clt.option_class,name)
tool_class(dbstate,None,options_class,name,None)
except:
log.error("Failed to start tool.", exc_info=True)