mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
printed output is a mess, now it should be yaml!
This commit is contained in:
parent
2669d98363
commit
e4b300d635
1 changed files with 3 additions and 1 deletions
|
@ -5,6 +5,7 @@ The management of salt command line utilities are stored in here
|
|||
import optparse
|
||||
import os
|
||||
import sys
|
||||
import yaml
|
||||
|
||||
# Import salt components
|
||||
import salt.client
|
||||
|
@ -110,7 +111,8 @@ class SaltCMD(object):
|
|||
if self.opts['fun'] == 'sys.doc':
|
||||
self._print_docs(ret)
|
||||
else:
|
||||
print ret
|
||||
if type(ret) == type(list()) or type(ret) == type(dict()):
|
||||
print yaml.dump(ret)
|
||||
|
||||
def _print_docs(self, ret):
|
||||
'''
|
||||
|
|
Loading…
Add table
Reference in a new issue