[compat] Handle tuples properly in urlencode()
[youtube-dl] / youtube_dl / compat.py
index 76b6b0e3838c65c2d5814d0206c18dfe713d6435..0b6c5ca7a8ba5eb6cb064916d56a5ca8eae32003 100644 (file)
@@ -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