From 23c94295dc2b7928999319c28305f503f6b14c69 Mon Sep 17 00:00:00 2001 From: Jordan Borean Date: Fri, 28 Sep 2018 09:04:03 +1000 Subject: [PATCH] Revert "powershell - fix for ANSIBLE_KEEP_REMOTE_FILES on older Pythons (#45942)" (#46238) This reverts commit ce515a626c5d31fec55ab7b0304575d2bf7b9eb0. --- changelogs/fragments/win_keep_remote_file_python26.yaml | 2 -- lib/ansible/plugins/shell/powershell.py | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) delete mode 100644 changelogs/fragments/win_keep_remote_file_python26.yaml diff --git a/changelogs/fragments/win_keep_remote_file_python26.yaml b/changelogs/fragments/win_keep_remote_file_python26.yaml deleted file mode 100644 index 20ca50112bf..00000000000 --- a/changelogs/fragments/win_keep_remote_file_python26.yaml +++ /dev/null @@ -1,2 +0,0 @@ -bugfixes: -- powershell - Fix issue where setting ANSIBLE_KEEP_REMOTE_FILES fails when using Python 2.6 - https://github.com/ansible/ansible/issues/45490 diff --git a/lib/ansible/plugins/shell/powershell.py b/lib/ansible/plugins/shell/powershell.py index 0aa703db78f..48ef5531f63 100644 --- a/lib/ansible/plugins/shell/powershell.py +++ b/lib/ansible/plugins/shell/powershell.py @@ -57,7 +57,7 @@ import re import shlex from ansible.errors import AnsibleError -from ansible.module_utils._text import to_native, to_text +from ansible.module_utils._text import to_text from ansible.plugins.shell import ShellBase @@ -1605,7 +1605,7 @@ class ShellModule(ShellBase): # non-pipelining - cmd_parts = shlex.split(to_native(cmd), posix=False) + cmd_parts = shlex.split(cmd, posix=False) cmd_parts = list(map(to_text, cmd_parts)) if shebang and shebang.lower() == '#!powershell': if not self._unquote(cmd_parts[0]).lower().endswith('.ps1'):