mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 05:12:45 +00:00
Merge branch 'fixes/subprocess' of https://github.com/ferringb/ansible into ferringb-fixes/subprocess
This commit is contained in:
@@ -935,10 +935,9 @@ class AnsibleModule(object):
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE)
|
||||
if data:
|
||||
cmd.stdin.write(data)
|
||||
if not binary_data:
|
||||
cmd.stdin.write('\\n')
|
||||
out, err = cmd.communicate()
|
||||
data += '\\n'
|
||||
out, err = cmd.communicate(input=data)
|
||||
rc = cmd.returncode
|
||||
except (OSError, IOError), e:
|
||||
self.fail_json(rc=e.errno, msg=str(e), cmd=args)
|
||||
|
||||
Reference in New Issue
Block a user