fallthrough to shlex.split on py3 in shlex_split

This commit is contained in:
Johnny Robeson 2016-06-26 16:56:09 -04:00
parent 890102e114
commit 33faa48516

View file

@ -766,8 +766,7 @@ def shlex_split(s):
Raise `ValueError` if the string is not a well-formed shell string.
This is a workaround for a bug in some versions of Python.
"""
if isinstance(s, bytes):
# Shlex works fine.
if not six.PY2 or isinstance(s, bytes): # Shlex works fine.
return shlex.split(s)
elif isinstance(s, six.text_type):