mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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.
This commit is contained in:
parent
5cd3f71792
commit
67594e8ec2
1 changed files with 1 additions and 2 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue