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.
|
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 = {}
|
docs = {}
|
||||||
for host in ret:
|
for name in ret:
|
||||||
for fun in ret[host]:
|
if not docs.has_key(name):
|
||||||
if not docs.has_key(fun):
|
if ret[name].__doc__:
|
||||||
if ret[host][fun]:
|
docs[name] = ret[name].__doc__
|
||||||
docs[fun] = ret[host][fun]
|
for name in sorted(docs):
|
||||||
for fun in sorted(docs):
|
print name + ':'
|
||||||
print fun + ':'
|
print docs[name]
|
||||||
print docs[fun]
|
|
||||||
print ''
|
print ''
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
'''
|
'''
|
||||||
Execute the salt call logic
|
Execute the salt call logic
|
||||||
|
@ -103,6 +103,8 @@ class Loader(object):
|
|||||||
modules = []
|
modules = []
|
||||||
funcs = {}
|
funcs = {}
|
||||||
for mod_dir in self.module_dirs:
|
for mod_dir in self.module_dirs:
|
||||||
|
if not mod_dir.startswith('/'):
|
||||||
|
continue
|
||||||
for fn_ in os.listdir(mod_dir):
|
for fn_ in os.listdir(mod_dir):
|
||||||
if fn_.startswith('_'):
|
if fn_.startswith('_'):
|
||||||
continue
|
continue
|
||||||
|
Loading…
Reference in New Issue
Block a user