Merge branch 'fixes/subprocess' of https://github.com/ferringb/ansible into ferringb-fixes/subprocess
This commit is contained in:
commit
5b205ae8bd
1 changed files with 2 additions and 3 deletions
|
@ -935,10 +935,9 @@ class AnsibleModule(object):
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.PIPE)
|
stderr=subprocess.PIPE)
|
||||||
if data:
|
if data:
|
||||||
cmd.stdin.write(data)
|
|
||||||
if not binary_data:
|
if not binary_data:
|
||||||
cmd.stdin.write('\\n')
|
data += '\\n'
|
||||||
out, err = cmd.communicate()
|
out, err = cmd.communicate(input=data)
|
||||||
rc = cmd.returncode
|
rc = cmd.returncode
|
||||||
except (OSError, IOError), e:
|
except (OSError, IOError), e:
|
||||||
self.fail_json(rc=e.errno, msg=str(e), cmd=args)
|
self.fail_json(rc=e.errno, msg=str(e), cmd=args)
|
||||||
|
|
Loading…
Add table
Reference in a new issue