fix applications command
This commit is contained in:
parent
dffda6f673
commit
dbaaa8ea0a
1 changed files with 8 additions and 9 deletions
|
|
@ -61,16 +61,15 @@ class WeboobCfg(ConsoleApplication):
|
||||||
|
|
||||||
@ConsoleApplication.command('List applications')
|
@ConsoleApplication.command('List applications')
|
||||||
def command_applications(self, *caps):
|
def command_applications(self, *caps):
|
||||||
|
applications = set()
|
||||||
import weboob.applications
|
import weboob.applications
|
||||||
path = weboob.applications.__path__[0]
|
for path in weboob.applications.__path__:
|
||||||
applications = []
|
regexp = re.compile('^%s/([\w\d_]+)$' % path)
|
||||||
regexp = re.compile('^%s/([\w\d_]+)$' % path)
|
for root, dirs, files in os.walk(path):
|
||||||
for root, dirs, files in os.walk(path):
|
m = regexp.match(root)
|
||||||
m = regexp.match(root)
|
if m and '__init__.py' in files:
|
||||||
if m and '__init__.py' in files:
|
applications.add(m.group(1))
|
||||||
applications.append(m.group(1))
|
print ' '.join(sorted(applications)).encode('utf-8')
|
||||||
|
|
||||||
print ' '.join(applications)
|
|
||||||
|
|
||||||
@ConsoleApplication.command('Display a module')
|
@ConsoleApplication.command('Display a module')
|
||||||
def command_modinfo(self, name):
|
def command_modinfo(self, name):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue