fix weboobcfg to new ModulesLoader API
This commit is contained in:
parent
f0e8747a9b
commit
24f80df0fd
1 changed files with 2 additions and 1 deletions
|
|
@ -33,6 +33,7 @@ class WeboobCfg(ConsoleApplication):
|
||||||
def command_modules(self):
|
def command_modules(self):
|
||||||
print ' Name Capabilities Description '
|
print ' Name Capabilities Description '
|
||||||
print '+--------------+----------------------+----------------------------------------+'
|
print '+--------------+----------------------+----------------------------------------+'
|
||||||
|
self.weboob.modules_loader.load()
|
||||||
for name, module in self.weboob.modules_loader.modules.iteritems():
|
for name, module in self.weboob.modules_loader.modules.iteritems():
|
||||||
first_line = True
|
first_line = True
|
||||||
for cap in module.iter_caps():
|
for cap in module.iter_caps():
|
||||||
|
|
@ -47,7 +48,7 @@ class WeboobCfg(ConsoleApplication):
|
||||||
@ConsoleApplication.command('Display a module')
|
@ConsoleApplication.command('Display a module')
|
||||||
def command_modinfo(self, name):
|
def command_modinfo(self, name):
|
||||||
try:
|
try:
|
||||||
module = self.weboob.modules_loader.modules[name]
|
module = self.weboob.modules_loader.get_or_load_module(name)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
print >>sys.stderr, 'No such module: %s' % name
|
print >>sys.stderr, 'No such module: %s' % name
|
||||||
return 1
|
return 1
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue