mirror of https://github.com/ansible/ansible
find: add locale encoding in err msg when none is given (#86641)
When the search fails, as expected, the following error is printed out:
[...] Failed to read the file FILENAME due to an encoding error. current encoding: None (default determined by the Python built-in function "open")
Add locale encoding in error messages when none is given.
As well, this case is hit for decoding exceptions, not encoding ones.
Change the error message.
Add the corresponding tests, update documentation.
Link: https://docs.python.org/3/library/locale.html#locale.getpreferredencoding
Co-authored-by: Matt Clay <matt@mystile.com>
Signed-off-by: Ariel Otilibili <a.otilibili@instadeep.com>
pull/86706/head
parent
e65e27c38a
commit
7d2aa2a4c6
@ -0,0 +1,3 @@
|
||||
---
|
||||
minor_changes:
|
||||
- find - add locale encoding in err msg when none is given
|
||||
Loading…
Reference in new issue