From 8f1303c81a40a249571970a1ecf727f0401c8bf5 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Thu, 3 Mar 2016 20:56:50 -0800 Subject: [PATCH] Remember to use errors=strict since this is looking up a filename on the filesystem (ie it has to match exactly) --- lib/ansible/plugins/action/copy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/plugins/action/copy.py b/lib/ansible/plugins/action/copy.py index 8941db434b0..a833b28b160 100644 --- a/lib/ansible/plugins/action/copy.py +++ b/lib/ansible/plugins/action/copy.py @@ -107,7 +107,7 @@ class ActionModule(ActionBase): source_files = [] # If source is a directory populate our list else source is a file and translate it to a tuple. - if os.path.isdir(to_bytes(source)): + if os.path.isdir(to_bytes(source, errors='strict')): # Get the amount of spaces to remove to get the relative path. if source_trailing_slash: sz = len(source)