0001908: BUG: running tools from command line
svn: r10303
This commit is contained in:
parent
3febc1e429
commit
68ad749f6a
@ -161,6 +161,7 @@ class CommandLineTool:
|
|||||||
self.database = database
|
self.database = database
|
||||||
self.category = category
|
self.category = category
|
||||||
self.option_class = option_class(name)
|
self.option_class = option_class(name)
|
||||||
|
self.option_class.load_previous_values()
|
||||||
self.show = options_str_dict.pop('show',None)
|
self.show = options_str_dict.pop('show',None)
|
||||||
self.options_str_dict = options_str_dict
|
self.options_str_dict = options_str_dict
|
||||||
self.init_options(noopt)
|
self.init_options(noopt)
|
||||||
|
@ -67,28 +67,27 @@ class Rebuild(Tool.Tool,UpdateCallback):
|
|||||||
return
|
return
|
||||||
|
|
||||||
self.db.disable_signals()
|
self.db.disable_signals()
|
||||||
|
|
||||||
if uistate:
|
if uistate:
|
||||||
self.callback = uistate.pulse_progressbar
|
self.callback = uistate.pulse_progressbar
|
||||||
uistate.set_busy_cursor(1)
|
uistate.set_busy_cursor(1)
|
||||||
uistate.progress.show()
|
uistate.progress.show()
|
||||||
uistate.push_message(dbstate, _("Rebuilding secondary indices..."))
|
uistate.push_message(dbstate, _("Rebuilding secondary indices..."))
|
||||||
else:
|
|
||||||
print "Rebuilding Secondary Indices..."
|
UpdateCallback.__init__(self,self.callback)
|
||||||
self.db.rebuild_secondary(self.empty)
|
self.set_total(11)
|
||||||
print "All secondary indices have been rebuilt."
|
self.db.rebuild_secondary(self.update)
|
||||||
|
self.reset()
|
||||||
UpdateCallback.__init__(self,self.callback)
|
|
||||||
self.set_total(11)
|
|
||||||
self.db.rebuild_secondary(self.update)
|
|
||||||
self.reset()
|
|
||||||
|
|
||||||
if uistate:
|
|
||||||
uistate.set_busy_cursor(0)
|
uistate.set_busy_cursor(0)
|
||||||
uistate.progress.hide()
|
uistate.progress.hide()
|
||||||
OkDialog(_("Secondary indices rebuilt"),
|
OkDialog(_("Secondary indices rebuilt"),
|
||||||
_('All secondary indices have been rebuilt.'))
|
_('All secondary indices have been rebuilt.'))
|
||||||
else:
|
else:
|
||||||
|
print "Rebuilding Secondary Indices..."
|
||||||
|
self.db.rebuild_secondary(self.update_empty)
|
||||||
print "All secondary indices have been rebuilt."
|
print "All secondary indices have been rebuilt."
|
||||||
|
|
||||||
self.db.enable_signals()
|
self.db.enable_signals()
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user