mirror of
https://github.com/saltstack/salt.git
synced 2025-04-10 14:51:40 +00:00
Convert stdin string to bytes regardless of stdin_raw_newlines
This commit is contained in:
parent
eba0b174d7
commit
9da6764eb8
2 changed files with 3 additions and 3 deletions
1
changelog/62501.fixed.md
Normal file
1
changelog/62501.fixed.md
Normal file
|
@ -0,0 +1 @@
|
|||
Convert stdin string to bytes regardless of stdin_raw_newlines
|
|
@ -33,9 +33,8 @@ class TimedProc:
|
|||
if not self.stdin_raw_newlines:
|
||||
# Translate a newline submitted as '\n' on the CLI to an actual
|
||||
# newline character.
|
||||
self.stdin = salt.utils.stringutils.to_bytes(
|
||||
self.stdin.replace("\\n", "\n")
|
||||
)
|
||||
self.stdin = self.stdin.replace("\\n", "\n")
|
||||
self.stdin = salt.utils.stringutils.to_bytes(self.stdin)
|
||||
kwargs["stdin"] = subprocess.PIPE
|
||||
|
||||
if not self.with_communicate:
|
||||
|
|
Loading…
Add table
Reference in a new issue