From 67594e8ec203c029f31fc7c06238d571d9764e3a Mon Sep 17 00:00:00 2001 From: Tobias Wolf Date: Wed, 27 Jan 2016 14:04:07 +0100 Subject: [PATCH] Fix handling of difflist containing multiple before/after pairs Commit ansible/ansible@c337293 introduced a difflist feature. The return value was not adequately outdented to append any diff after the first. --- lib/ansible/plugins/callback/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/ansible/plugins/callback/__init__.py b/lib/ansible/plugins/callback/__init__.py index bb24577d648..3a1e5f8caee 100644 --- a/lib/ansible/plugins/callback/__init__.py +++ b/lib/ansible/plugins/callback/__init__.py @@ -106,7 +106,6 @@ class CallbackBase: try: with warnings.catch_warnings(): warnings.simplefilter('ignore') - ret = [] if 'dst_binary' in diff: ret.append("diff skipped: destination file appears to be binary\n") if 'src_binary' in diff: @@ -133,9 +132,9 @@ class CallbackBase: ret.append('\n') if 'prepared' in diff: ret.append(to_unicode(diff['prepared'])) - return u"".join(ret) except UnicodeDecodeError: ret.append(">> the files are different, but the diff library cannot compare unicode strings\n\n") + return u"".join(ret) def _get_item(self, result): if result.get('_ansible_no_log', False):