mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #23380 from gladiatr72/fix_for_double_output_with_static__salt_CLI/v2015.2
Fix for double output with static salt cli/v2015.2
This commit is contained in:
commit
a9777761d8
1 changed files with 5 additions and 7 deletions
|
@ -55,7 +55,7 @@ class SaltCMD(parsers.SaltCMDOptionParser):
|
|||
self.exit(2, '{0}\n'.format(exc))
|
||||
return
|
||||
|
||||
if self.options.batch:
|
||||
if self.options.batch or self.options.static:
|
||||
import salt.cli.batch
|
||||
eauth = {}
|
||||
if 'token' in self.config:
|
||||
|
@ -80,6 +80,9 @@ class SaltCMD(parsers.SaltCMDOptionParser):
|
|||
|
||||
if self.options.static:
|
||||
|
||||
if not self.options.batch:
|
||||
self.config['batch'] = '100%'
|
||||
|
||||
batch = salt.cli.batch.Batch(self.config, eauth=eauth, quiet=True)
|
||||
|
||||
ret = {}
|
||||
|
@ -166,12 +169,7 @@ class SaltCMD(parsers.SaltCMDOptionParser):
|
|||
kwargs['cli'] = True
|
||||
else:
|
||||
cmd_func = local.cmd_cli
|
||||
if self.options.static:
|
||||
if self.options.verbose:
|
||||
kwargs['verbose'] = True
|
||||
full_ret = local.cmd_full_return(**kwargs)
|
||||
ret, out, retcode = self._format_ret(full_ret)
|
||||
self._output_ret(ret, out)
|
||||
|
||||
if self.options.progress:
|
||||
kwargs['progress'] = True
|
||||
self.config['progress'] = True
|
||||
|
|
Loading…
Add table
Reference in a new issue