From f39b8cae95300529228037a60377da678db4cf9b Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Wed, 12 Mar 2014 18:21:53 +0100 Subject: [PATCH] Fix #5679 again after recent changes in core --- files/lineinfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/files/lineinfile b/files/lineinfile index 73c9e88cb8c..bdc7b51ed90 100644 --- a/files/lineinfile +++ b/files/lineinfile @@ -350,9 +350,8 @@ def main(): if ins_bef is None and ins_aft is None: ins_aft = 'EOF' - # Replace the newline character with an actual newline. Don't replace - # escaped \\n, hence sub and not str.replace. - line = re.sub(r'\n', os.linesep, params['line']) + # Replace the newline character with an actual newline. + line = params['line'].decode('string_escape') present(module, dest, params['regexp'], line, ins_aft, ins_bef, create, backup, backrefs)