all loaded backends are now configured (refs #368)
This commit is contained in:
parent
8afff42465
commit
9581fa0b19
15 changed files with 17 additions and 45 deletions
|
|
@ -179,14 +179,6 @@ class BaseApplication(object):
|
|||
logging.warning(u'No backend loaded')
|
||||
return loaded
|
||||
|
||||
def load_configured_backends(self, caps=None, names=None, *args, **kwargs):
|
||||
if names is None:
|
||||
names = self.requested_backends
|
||||
loaded = self.weboob.load_configured_backends(caps, names, *args, **kwargs)
|
||||
if not loaded:
|
||||
logging.warning(u'No configured backend loaded')
|
||||
return loaded
|
||||
|
||||
def _get_optparse_version(self):
|
||||
version = None
|
||||
if self.VERSION:
|
||||
|
|
|
|||
|
|
@ -273,8 +273,8 @@ class ConsoleApplication(BaseApplication):
|
|||
register_command = staticmethod(register_command)
|
||||
command = staticmethod(command)
|
||||
|
||||
def load_configured_backends(self, caps=None, names=None, *args, **kwargs):
|
||||
loaded_backends = BaseApplication.load_configured_backends(self, caps, names, *args, **kwargs)
|
||||
def load_backends(self, caps=None, names=None, *args, **kwargs):
|
||||
loaded_backends = BaseApplication.load_backends(self, caps, names, *args, **kwargs)
|
||||
if not loaded_backends:
|
||||
logging.error(u'Cannot start application: no configured backend was found.\nHere is a list of all available backends:')
|
||||
from weboob.applications.weboobcfg import WeboobCfg
|
||||
|
|
|
|||
|
|
@ -310,6 +310,6 @@ class BackendCfg(QDialog):
|
|||
ret = (len(self.to_load) > 0 or len(self.to_unload) > 0)
|
||||
|
||||
self.weboob.unload_backends(self.to_unload)
|
||||
self.weboob.load_configured_backends(names=self.to_load)
|
||||
self.weboob.load_backends(names=self.to_load)
|
||||
|
||||
return ret
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue