listing of backends: fix crash if a module cannot be loaded
This commit is contained in:
parent
cd96fc8d9a
commit
1a09823c1c
1 changed files with 6 additions and 1 deletions
|
|
@ -118,7 +118,12 @@ class WeboobCfg(ReplApplication):
|
||||||
"""
|
"""
|
||||||
caps = line.split()
|
caps = line.split()
|
||||||
for instance_name, name, params in sorted(self.weboob.backends_config.iter_backends()):
|
for instance_name, name, params in sorted(self.weboob.backends_config.iter_backends()):
|
||||||
module = self.weboob.modules_loader.get_or_load_module(name)
|
try:
|
||||||
|
module = self.weboob.modules_loader.get_or_load_module(name)
|
||||||
|
except ModuleLoadError, e:
|
||||||
|
self.logger.warning('Unable to load module %r: %s' % (name, e))
|
||||||
|
continue
|
||||||
|
|
||||||
if caps and not module.has_caps(*caps):
|
if caps and not module.has_caps(*caps):
|
||||||
continue
|
continue
|
||||||
row = OrderedDict([('Name', instance_name),
|
row = OrderedDict([('Name', instance_name),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue