load modules on demand for load_backends
This commit is contained in:
parent
734ed400fb
commit
f0e8747a9b
2 changed files with 7 additions and 2 deletions
|
|
@ -118,6 +118,11 @@ class ModulesLoader:
|
|||
def __init__(self):
|
||||
self.modules = {}
|
||||
|
||||
def get_or_load_module(self, name):
|
||||
if name not in self.modules:
|
||||
self.load_module('weboob.backends.%s' % name)
|
||||
return self.modules[name]
|
||||
|
||||
def load(self):
|
||||
path = backends.__path__[0]
|
||||
regexp = re.compile('^%s/([\w\d_]+)$' % path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue