do not ask before installing a module
This commit is contained in:
parent
b3c797978a
commit
fd22eb5367
2 changed files with 3 additions and 6 deletions
|
|
@ -274,10 +274,7 @@ class ConsoleApplication(BaseApplication):
|
|||
raise ModuleLoadError(name, 'Module does not exist')
|
||||
if not minfo.is_installed():
|
||||
print 'Module "%s" is available but not installed.' % minfo.name
|
||||
if self.ask('Do you want to install it now?', default=True):
|
||||
self.install_module(minfo)
|
||||
else:
|
||||
return 1
|
||||
self.install_module(minfo)
|
||||
module = self.weboob.modules_loader.get_or_load_module(name)
|
||||
config = module.config
|
||||
else:
|
||||
|
|
|
|||
|
|
@ -228,7 +228,7 @@ class BackendCfg(QDialog):
|
|||
params.pop('_enabled', None)
|
||||
|
||||
info = self.weboob.repositories.get_module_info(name)
|
||||
if info and (info.is_installed() or self.askInstallModule(info)):
|
||||
if info and (info.is_installed() or self.installModule(info)):
|
||||
backend = self.weboob.modules_loader.get_or_load_module(bname)
|
||||
for key, value in backend.config.load(self.weboob, bname, name, params, nofail=True).iteritems():
|
||||
try:
|
||||
|
|
@ -266,7 +266,7 @@ class BackendCfg(QDialog):
|
|||
warning('Module not found')
|
||||
return
|
||||
|
||||
if not minfo.is_installed() and not self.askInstallModule(minfo):
|
||||
if not minfo.is_installed() and not self.installModule(minfo):
|
||||
self.editBackend(None)
|
||||
return
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue