mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 17:33:54 +00:00
Fix the docs printing sequence
This commit is contained in:
parent
29d0356e49
commit
4757387f99
@ -33,18 +33,17 @@ class Caller(object):
|
||||
'''
|
||||
Pick up the documentation for all of the modules and print it out.
|
||||
'''
|
||||
ret = self.loader.call('sys.doc', self.opts['arg'])
|
||||
ret = self.loader.apply_introspection(self.loader.gen_functions())
|
||||
docs = {}
|
||||
for host in ret:
|
||||
for fun in ret[host]:
|
||||
if not docs.has_key(fun):
|
||||
if ret[host][fun]:
|
||||
docs[fun] = ret[host][fun]
|
||||
for fun in sorted(docs):
|
||||
print fun + ':'
|
||||
print docs[fun]
|
||||
for name in ret:
|
||||
if not docs.has_key(name):
|
||||
if ret[name].__doc__:
|
||||
docs[name] = ret[name].__doc__
|
||||
for name in sorted(docs):
|
||||
print name + ':'
|
||||
print docs[name]
|
||||
print ''
|
||||
|
||||
|
||||
def run(self):
|
||||
'''
|
||||
Execute the salt call logic
|
||||
|
@ -103,6 +103,8 @@ class Loader(object):
|
||||
modules = []
|
||||
funcs = {}
|
||||
for mod_dir in self.module_dirs:
|
||||
if not mod_dir.startswith('/'):
|
||||
continue
|
||||
for fn_ in os.listdir(mod_dir):
|
||||
if fn_.startswith('_'):
|
||||
continue
|
||||
|
Loading…
Reference in New Issue
Block a user