mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
fix 34425, a bug that sys.doc cannot output format
This commit is contained in:
parent
d79cb1b4ec
commit
86fb359f58
1 changed files with 10 additions and 7 deletions
|
@ -364,10 +364,13 @@ class SaltCMD(parsers.SaltCMDOptionParser):
|
|||
if ret[host] == 'Minion did not return. [Not connected]':
|
||||
continue
|
||||
for fun in ret[host]:
|
||||
if fun not in docs:
|
||||
if ret[host][fun]:
|
||||
docs[fun] = ret[host][fun]
|
||||
for fun in sorted(docs):
|
||||
salt.output.display_output(fun + ':', 'nested', self.config)
|
||||
print_cli(docs[fun])
|
||||
print_cli('')
|
||||
if fun not in docs and ret[host][fun]:
|
||||
docs[fun] = ret[host][fun]
|
||||
if 'output' in self.config:
|
||||
for fun in sorted(docs):
|
||||
salt.output.display_output({fun: docs[fun]}, 'nested', self.config)
|
||||
else:
|
||||
for fun in sorted(docs):
|
||||
print_cli('{0}:'.format(fun))
|
||||
print_cli(docs[fun])
|
||||
print_cli('')
|
||||
|
|
Loading…
Add table
Reference in a new issue