community.general/lib/ansible
Marius Gedminas 5d29a2eabd Python 3: shlex.split() wants unicode
On Python 2, shlex.split() raises if you pass it a unicode object with
non-ASCII characters in it.  The Ansible codebase copes by explicitly
converting the string using to_bytes() before passing it to
shlex.split().

On Python 3, shlex.split() raises ('bytes' object has no attribute 'read')
if you pass a bytes object.  Oops.

This commit introduces a new wrapper function, shlex_split, that
transparently performs the to_bytes/to_unicode conversions only on
Python 2.

Currently I've only converted one call site (the one that was causing a
unit test to fail on Python 3).  If this approach is deemed suitable,
I'll convert them all.
2015-09-24 12:36:05 +03:00
..
cli Apply --limit to inventory in adhoc commands 2015-09-23 08:28:38 -04:00
compat Making the switch to v2 2015-05-03 21:47:26 -05:00
config Making the switch to v2 2015-05-03 21:47:26 -05:00
errors Making the switch to v2 2015-05-03 21:47:26 -05:00
executor correct typo on error reporting 2015-09-23 10:11:52 -04:00
galaxy Fix typo in ansible module_utils import from galaxy code 2015-09-17 14:25:48 -04:00
inventory Python 3: shlex.split() wants unicode 2015-09-24 12:36:05 +03:00
module_utils Python 3: there's no itertools.imap 2015-09-23 10:04:26 +03:00
modules Update submodule refs 2015-09-23 08:40:59 -07:00
new_inventory Making the switch to v2 2015-05-03 21:47:26 -05:00
parsing Python 3: there's no basestring 2015-09-22 08:42:33 +03:00
playbook Improve error catching from malformed playbook data 2015-09-23 08:56:36 -04:00
plugins Convert to byte strings to avoid UnicodeErrors 2015-09-23 15:24:17 -07:00
template Fix safe_eval() of set literals 2015-09-11 09:41:05 +03:00
utils Python 3: shlex.split() wants unicode 2015-09-24 12:36:05 +03:00
vars Remove unnecessary calls to save inventory restrictions since 81bf88b 2015-09-23 12:18:09 -04:00
__init__.py Re-adding submodules after moving things around 2015-05-03 22:30:51 -05:00
constants.py Implement ssh connection handling as a state machine 2015-09-23 01:55:00 -04:00
test-requirements.txt Making the switch to v2 2015-05-03 21:47:26 -05:00