diff options
author | Brian Coca <bcoca@users.noreply.github.com> | 2021-08-05 17:08:17 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-05 16:08:17 -0500 |
commit | bb993dc87730e8998f0a2225bbd5de4bbf27cba8 (patch) | |
tree | 06159d7002a65d55205d3bd3edd8b47379220bde | |
parent | 2023363b399ad9a63145ff95fd1aa95e0f2a6879 (diff) | |
download | ansible-bb993dc87730e8998f0a2225bbd5de4bbf27cba8.tar.gz |
ensure we convert path in warning or py2.6 breaks (#75413) (#75414)
(cherry picked from commit 75e6bdb5799ffb310bca9fee0707b5c6ffb15cc5)
-rw-r--r-- | changelogs/fragments/find_error_fix.yml | 2 | ||||
-rw-r--r-- | lib/ansible/modules/find.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/changelogs/fragments/find_error_fix.yml b/changelogs/fragments/find_error_fix.yml new file mode 100644 index 0000000000..c4dcbd5a2f --- /dev/null +++ b/changelogs/fragments/find_error_fix.yml @@ -0,0 +1,2 @@ +bugfixes: + - find action, correctly convert path to text when warning about skiping. diff --git a/lib/ansible/modules/find.py b/lib/ansible/modules/find.py index 7db5004ca3..ca8b483b16 100644 --- a/lib/ansible/modules/find.py +++ b/lib/ansible/modules/find.py @@ -493,7 +493,7 @@ def main(): if not params['recurse']: break except Exception as e: - warn = "Skipped '%s' path due to this access issue: %s\n" % (npath, to_text(e)) + warn = "Skipped '%s' path due to this access issue: %s\n" % (to_text(npath), to_text(e)) module.warn(warn) msg += warn |