diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index cb969b9ceed..f7a9bbf4141 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -1197,7 +1197,7 @@ class AnsibleModule(object): kwargs['owner'] = user kwargs['group'] = group st = os.lstat(path) - kwargs['mode'] = oct(stat.S_IMODE(st[stat.ST_MODE])) + kwargs['mode'] = '0%03o' % stat.S_IMODE(st[stat.ST_MODE]) # secontext not yet supported if os.path.islink(path): kwargs['state'] = 'link' diff --git a/lib/ansible/plugins/action/copy.py b/lib/ansible/plugins/action/copy.py index c5c266bf5d2..68b60d35da0 100644 --- a/lib/ansible/plugins/action/copy.py +++ b/lib/ansible/plugins/action/copy.py @@ -113,7 +113,7 @@ class ActionModule(ActionBase): # Walk the directory and append the file tuples to source_files. for base_path, sub_folders, files in os.walk(to_bytes(source)): for file in files: - full_path = os.path.join(base_path, file) + full_path = to_unicode(os.path.join(base_path, file), errors='strict') rel_path = full_path[sz:] if rel_path.startswith('/'): rel_path = rel_path[1:] diff --git a/test/utils/shippable/python3-test-tag-blacklist.txt b/test/utils/shippable/python3-test-tag-blacklist.txt index 3da1b221cc6..198b49a0f05 100644 --- a/test/utils/shippable/python3-test-tag-blacklist.txt +++ b/test/utils/shippable/python3-test-tag-blacklist.txt @@ -3,8 +3,6 @@ test_apt test_assemble test_async test_authorized_key -test_copy -test_file test_filters test_gem test_get_url