aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/compat.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2016-07-07 19:42:22 +0200
committerPhilipp Hagemeister <phihag@phihag.de>2016-07-07 19:42:22 +0200
commit826e911e41b9daa266132f575fb4128e25d33186 (patch)
tree37336803defdb1471fffdd3213820b1437486fc0 /youtube_dl/compat.py
parent30d22dae8e39237244798a8c3fa93df11edd2548 (diff)
parentec3518725b2d33c2bd664a965ead007e000dec37 (diff)
Merge branch 'master' of github.com:rg3/youtube-dl
Diffstat (limited to 'youtube_dl/compat.py')
-rw-r--r--youtube_dl/compat.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/youtube_dl/compat.py b/youtube_dl/compat.py
index 83b96d38f..b8aaf5a46 100644
--- a/youtube_dl/compat.py
+++ b/youtube_dl/compat.py
@@ -2596,9 +2596,12 @@ except ImportError: # Python < 3.3
try:
- assert shlex.split('中文') == ['中文']
+ args = shlex.split('中文')
+ assert (isinstance(args, list) and
+ isinstance(args[0], compat_str) and
+ args[0] == '中文')
compat_shlex_split = shlex.split
-except (AssertionError, UnicodeWarning, UnicodeEncodeError):
+except (AssertionError, UnicodeEncodeError):
# Working around shlex issue with unicode strings on some python 2
# versions (see http://bugs.python.org/issue1548891)
def compat_shlex_split(s, comments=False, posix=True):