mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Slight style preferences.
This commit is contained in:
parent
5fcbfa984d
commit
c98b20b2cf
1 changed files with 2 additions and 5 deletions
|
@ -720,15 +720,12 @@ class Runner(object):
|
||||||
|
|
||||||
result = self._low_level_exec_command(conn, cmd, None, sudoable=False)
|
result = self._low_level_exec_command(conn, cmd, None, sudoable=False)
|
||||||
if result['rc'] != 0:
|
if result['rc'] != 0:
|
||||||
raise errors.AnsibleError('could not create temporary directory: '
|
raise errors.AnsibleError('could not create temporary directory, SSH exited with result %d' % result['rc'])
|
||||||
'SSH exited with return code %d' % result['rc'])
|
|
||||||
rc = utils.last_non_blank_line(result['stdout']).strip() + '/'
|
rc = utils.last_non_blank_line(result['stdout']).strip() + '/'
|
||||||
# Catch any other failure conditions here; files should never be
|
# Catch any other failure conditions here; files should never be
|
||||||
# written directly to /.
|
# written directly to /.
|
||||||
if rc == '/':
|
if rc == '/':
|
||||||
raise errors.AnsibleError('failed to resolve remote temporary '
|
raise errors.AnsibleError('failed to resolve remote temporary directory from %s: `%s` returned empty string' % (basetmp, cmd))
|
||||||
'directory from %s: `%s` returned '
|
|
||||||
'empty string' % (basetmp, cmd))
|
|
||||||
return rc
|
return rc
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue