mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #35323 from thatch45/ssh_crazy
Fix issue with bad error check in salt-vt
This commit is contained in:
commit
4618b433e9
2 changed files with 9 additions and 10 deletions
|
@ -274,7 +274,7 @@ class SSH(object):
|
|||
'''
|
||||
if not isinstance(ret[host], dict) or self.opts.get('ssh_key_deploy'):
|
||||
target = self.targets[host]
|
||||
if 'passwd' in target or self.opts['ssh_passwd']:
|
||||
if target.get('passwd', False) or self.opts['ssh_passwd']:
|
||||
self._key_deploy_run(host, target, False)
|
||||
return ret
|
||||
if ret[host].get('stderr', '').count('Permission denied'):
|
||||
|
@ -792,6 +792,12 @@ class Single(object):
|
|||
minion_opts=self.minion_opts,
|
||||
**self.target)
|
||||
opts_pkg = pre_wrapper['test.opts_pkg']() # pylint: disable=E1102
|
||||
if '_error' in opts_pkg:
|
||||
#Refresh failed
|
||||
retcode = opts_pkg['retcode']
|
||||
ret = json.dumps({'local': opts_pkg})
|
||||
return ret, retcode
|
||||
|
||||
opts_pkg['file_roots'] = self.opts['file_roots']
|
||||
opts_pkg['pillar_roots'] = self.opts['pillar_roots']
|
||||
opts_pkg['ext_pillar'] = self.opts['ext_pillar']
|
||||
|
@ -807,12 +813,6 @@ class Single(object):
|
|||
|
||||
retcode = 0
|
||||
|
||||
if '_error' in opts_pkg:
|
||||
#Refresh failed
|
||||
retcode = opts_pkg['retcode']
|
||||
ret = json.dumps({'local': opts_pkg['_error']})
|
||||
return ret, retcode
|
||||
|
||||
pillar = salt.pillar.Pillar(
|
||||
opts_pkg,
|
||||
opts_pkg['grains'],
|
||||
|
|
|
@ -116,10 +116,9 @@ class Terminal(object):
|
|||
# Let's avoid Zombies!!!
|
||||
_cleanup()
|
||||
|
||||
if not args and not executable and not shell:
|
||||
if not args and not executable:
|
||||
raise TerminalException(
|
||||
'You need to pass at least one of \'args\', \'executable\' '
|
||||
'or \'shell=True\''
|
||||
'You need to pass at least one of "args", "executable" '
|
||||
)
|
||||
|
||||
self.args = args
|
||||
|
|
Loading…
Add table
Reference in a new issue