From 33faa48516f691063eed5da907dd6ad284aa446d Mon Sep 17 00:00:00 2001 From: Johnny Robeson Date: Sun, 26 Jun 2016 16:56:09 -0400 Subject: [PATCH] fallthrough to shlex.split on py3 in shlex_split --- beets/util/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/beets/util/__init__.py b/beets/util/__init__.py index 56504ec3f..294074d10 100644 --- a/beets/util/__init__.py +++ b/beets/util/__init__.py @@ -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):