From 9f2bba01bad27fdabfa886b51ec2946a23baf468 Mon Sep 17 00:00:00 2001 From: Stoned Elipot Date: Wed, 20 Feb 2013 22:45:45 +0100 Subject: [PATCH] Fix diff output vertical spacing --- lib/ansible/utils/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/ansible/utils/__init__.py b/lib/ansible/utils/__init__.py index c1f7cf3a50..3564897f5f 100644 --- a/lib/ansible/utils/__init__.py +++ b/lib/ansible/utils/__init__.py @@ -627,8 +627,8 @@ def get_diff(before, after): try: with warnings.catch_warnings(): warnings.simplefilter('ignore') - differ = difflib.unified_diff(before.split("\n"), after.split("\n"), 'before', 'after', '', '', 10) - return "\n".join(list(differ)) + differ = difflib.unified_diff(before.splitlines(True), after.splitlines(True), 'before', 'after', '', '', 10) + return "".join(list(differ)) except UnicodeDecodeError: return ">> the files are different, but the diff library cannot compare unicode strings"