forked from ansible/ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[stable-2.7] Ensure that the src file contents is converted to unicod…
…e in diff info (ansible#45744) * Ensure that the src file contents is converted to unicode in diff info. Fixes ansible#45717 * Fix up and cleanup * The diff functionality in the callback plugins should have the to_text() calls removed since we're now doing it in ActionBase * catching of UnicodeError and warnings in the callback diff functionality from 61d01f5 haven't been needed since we switched to to_text so remove them. * Add a note to ActionBase's diff function giving an example of when the diff function will be inaccurate and how to fix it * Fix callback get_diff() tests I believe the unittests of callback's get_diff() were wrong. They were sending in a list where strings were expected. Because previous code was transforming the lists into strings via their repr, the previous tests did not fail but they would have formatted the test cases output in an odd way if we had looked at it. (cherry picked from commit 95e77ac) Co-authored-by: Matt Martz <matt@sivel.net>
- Loading branch information
Showing
4 changed files
with
94 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
bugfixes: | ||
- copy - Ensure that the src file contents is converted to unicode in diff | ||
information so that it is properly wrapped by AnsibleUnsafeText to prevent | ||
unexpected templating of diff data in Python3 | ||
(https://github.com/ansible/ansible/issues/45717) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters