mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
When writing output to stdout we want to ensure that the data is a string not bytes. Under py2 the salt.utils.data.encode function results in a string but under py3 the result is a bytestring. Swapping out salt.utils.data.encode for salt.utils.stringutils.to_str.
This commit is contained in:
parent
dda1ebbabc
commit
ffdae27877
1 changed files with 1 additions and 1 deletions
|
@ -686,7 +686,7 @@ class Terminal(object):
|
|||
stdout = None
|
||||
else:
|
||||
if self.stream_stdout:
|
||||
self.stream_stdout.write(salt.utils.data.encode(stdout))
|
||||
self.stream_stdout.write(salt.utils.stringutils.to_str(stdout))
|
||||
self.stream_stdout.flush()
|
||||
|
||||
if self.stdout_logger:
|
||||
|
|
Loading…
Add table
Reference in a new issue