diff options
author | Felix Fontein <felix@fontein.de> | 2022-03-22 16:19:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-22 16:19:53 +0100 |
commit | 4baf18c573c17cf9cd5716b28dbf38a32b57aaff (patch) | |
tree | 1450192bddb5a91e42940026abff763cc2a92c16 /lib/ansible/utils | |
parent | c1a34d5a6337002edf74dbd63d4bc68ce8e085e8 (diff) | |
download | ansible-4baf18c573c17cf9cd5716b28dbf38a32b57aaff.tar.gz |
Remove more Python 2.x compatibility code from controller. (#77320)
Diffstat (limited to 'lib/ansible/utils')
-rw-r--r-- | lib/ansible/utils/cmd_functions.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/ansible/utils/cmd_functions.py b/lib/ansible/utils/cmd_functions.py index c35e2b35b0..d4edb2f45f 100644 --- a/lib/ansible/utils/cmd_functions.py +++ b/lib/ansible/utils/cmd_functions.py @@ -30,8 +30,7 @@ from ansible.module_utils._text import to_bytes def run_cmd(cmd, live=False, readsize=10): cmdargs = shlex.split(cmd) - # subprocess should be passed byte strings. (on python2.6 it must be - # passed byte strtings) + # subprocess should be passed byte strings. cmdargs = [to_bytes(a, errors='surrogate_or_strict') for a in cmdargs] p = subprocess.Popen(cmdargs, stdout=subprocess.PIPE, stderr=subprocess.PIPE) |