aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/compat.py
diff options
context:
space:
mode:
authorYen Chi Hsuan <yan12125@gmail.com>2016-04-06 18:29:54 +0800
committerYen Chi Hsuan <yan12125@gmail.com>2016-04-06 18:29:54 +0800
commit92d5477d84c6663e71d6d22e261753a16b78000f (patch)
tree03a8f210c735bbf64f6a4d9e43a9ceaeae471cd0 /youtube_dl/compat.py
parent8790249c6860374b4d7eeeffae9e7b30d346eaf7 (diff)
[compat] Handle tuples properly in urlencode()
Fixes #9055
Diffstat (limited to 'youtube_dl/compat.py')
-rw-r--r--youtube_dl/compat.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/compat.py b/youtube_dl/compat.py
index 76b6b0e38..0b6c5ca7a 100644
--- a/youtube_dl/compat.py
+++ b/youtube_dl/compat.py
@@ -181,7 +181,8 @@ except ImportError: # Python 2
if isinstance(e, dict):
e = encode_dict(e)
elif isinstance(e, (list, tuple,)):
- e = encode_list(e)
+ list_e = encode_list(e)
+ e = tuple(list_e) if isinstance(e, tuple) else list_e
elif isinstance(e, compat_str):
e = e.encode(encoding)
return e