mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Revert "Convert to bytes later so that make_become_command can jsut operate on text type."
This reverts commit c4da5840b5
.
Going to do this in the connection plugins
This commit is contained in:
parent
cd3cfa93bf
commit
559ba467c0
1 changed files with 3 additions and 1 deletions
|
@ -488,6 +488,8 @@ class ActionBase(with_metaclass(ABCMeta, object)):
|
|||
verbatim, then this won't work. May have to use some sort of
|
||||
replacement strategy (python3 could use surrogateescape)
|
||||
'''
|
||||
# We may need to revisit this later.
|
||||
cmd = to_bytes(cmd, errors='strict')
|
||||
if executable is not None:
|
||||
cmd = executable + ' -c ' + cmd
|
||||
|
||||
|
@ -504,7 +506,7 @@ class ActionBase(with_metaclass(ABCMeta, object)):
|
|||
cmd = self._play_context.make_become_cmd(cmd, executable=executable)
|
||||
|
||||
display.debug("_low_level_execute_command(): executing: %s" % (cmd,))
|
||||
rc, stdout, stderr = self._connection.exec_command(to_bytes(cmd, errors='strict'), in_data=in_data, sudoable=sudoable)
|
||||
rc, stdout, stderr = self._connection.exec_command(cmd, in_data=in_data, sudoable=sudoable)
|
||||
|
||||
# stdout and stderr may be either a file-like or a bytes object.
|
||||
# Convert either one to a text type
|
||||
|
|
Loading…
Reference in a new issue