From: Yen Chi Hsuan Date: Sat, 9 Apr 2016 11:27:54 +0000 (+0800) Subject: [utils] Don't touch URLs if not necessary X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=cacd9966624883523b264fa9ac48138074597730;p=youtube-dl [utils] Don't touch URLs if not necessary Fix test_Generic_15 (Google redirect) --- diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index 8e53962c9..999dfabb5 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -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)