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.
pull/14899/head
Tobias Wolf 9 years ago committed by James Cammarata
parent e5b5b78d3c
commit dd98f5c6cc

@ -95,7 +95,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:
@ -122,9 +121,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):

Loading…
Cancel
Save