1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Fix mistaken double backslash

The module helper function run_command was appending a literal backslash
followed by 'n' to the stdin of a command it runs unless you called it
with binary_data=True (not the default).  I have changed it to what
I expect was the intent, to append an actual line feed to stdin.
This commit is contained in:
Dale Sedivec 2014-02-19 20:38:21 -06:00
parent 7fe3db408d
commit 498c8e8d57

View file

@ -1039,7 +1039,7 @@ class AnsibleModule(object):
if data: if data:
if not binary_data: if not binary_data:
data += '\\n' data += '\n'
out, err = cmd.communicate(input=data) out, err = cmd.communicate(input=data)
rc = cmd.returncode rc = cmd.returncode
except (OSError, IOError), e: except (OSError, IOError), e: