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/executor/module_common.py | |
| parent | c1a34d5a6337002edf74dbd63d4bc68ce8e085e8 (diff) | |
| download | ansible-4baf18c573c17cf9cd5716b28dbf38a32b57aaff.tar.gz | |
Remove more Python 2.x compatibility code from controller. (#77320)
Diffstat (limited to 'lib/ansible/executor/module_common.py')
| -rw-r--r-- | lib/ansible/executor/module_common.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/ansible/executor/module_common.py b/lib/ansible/executor/module_common.py index f906be67a8..470b085190 100644 --- a/lib/ansible/executor/module_common.py +++ b/lib/ansible/executor/module_common.py @@ -1314,8 +1314,8 @@ def _extract_interpreter(b_module_data): if b_lines[0].startswith(b"#!"): b_shebang = b_lines[0].strip() - # shlex.split on python-2.6 needs bytes. On python-3.x it needs text - cli_split = shlex.split(to_native(b_shebang[2:], errors='surrogate_or_strict')) + # shlex.split needs text on Python 3 + cli_split = shlex.split(to_text(b_shebang[2:], errors='surrogate_or_strict')) # convert args to text cli_split = [to_text(a, errors='surrogate_or_strict') for a in cli_split] |
