]> gitweb @ CieloNegro.org - youtube-dl.git/commitdiff
[utils] Don't touch URLs if not necessary
authorYen Chi Hsuan <yan12125@gmail.com>
Sat, 9 Apr 2016 11:27:54 +0000 (19:27 +0800)
committerYen Chi Hsuan <yan12125@gmail.com>
Sat, 9 Apr 2016 11:27:54 +0000 (19:27 +0800)
Fix test_Generic_15 (Google redirect)

youtube_dl/utils.py

index 8e53962c95172688b5b64152b6b33a383d29a029..999dfabb59a5bceb88b4423f0cc91abc81eefc3e 100644 (file)
@@ -1792,6 +1792,8 @@ def urlencode_postdata(*args, **kargs):
 
 
 def update_url_query(url, query):
+    if not query:
+        return url
     parsed_url = compat_urlparse.urlparse(url)
     qs = compat_parse_qs(parsed_url.query)
     qs.update(query)