From d5f27901e324ad6904ea4da1ddc9cd12bf72e543 Mon Sep 17 00:00:00 2001 From: twangboy Date: Wed, 23 Aug 2017 17:16:49 -0600 Subject: [PATCH] Fix additional bytestring issue --- salt/modules/file.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/salt/modules/file.py b/salt/modules/file.py index c5f27d2ec5..f6fd3e5a5d 100644 --- a/salt/modules/file.py +++ b/salt/modules/file.py @@ -2179,7 +2179,7 @@ def replace(path, if not_found_content is None: not_found_content = repl if prepend_if_not_found: - new_file.insert(0, not_found_content + os.linesep) + new_file.insert(0, not_found_content + salt.utils.to_bytes(os.linesep)) else: # append_if_not_found # Make sure we have a newline at the end of the file