mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-13 20:31:24 +00:00
Merge pull request #14105 from towolf/expand_get_diff
Handle the key 'custom' in the 'diff' result from modules
This commit is contained in:
@@ -131,6 +131,8 @@ class CallbackBase:
|
||||
differ = difflib.unified_diff(to_unicode(diff['before']).splitlines(True), to_unicode(diff['after']).splitlines(True), before_header, after_header, '', '', 10)
|
||||
ret.extend(list(differ))
|
||||
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")
|
||||
|
||||
Reference in New Issue
Block a user