avoid putting "extra_http_headers" in params if value is None (because "in" operator would return true)

This commit is contained in:
Noah Levitt 2015-07-24 01:40:35 +00:00
parent a04bf04307
commit 060b796d78

View File

@ -34,8 +34,9 @@ class BrozzlerWorker:
"noprogress": True,
"nopart": True,
"no_color": True,
"extra_http_headers": site.extra_headers,
}
if site.extra_headers:
ydl_opts["extra_http_headers"] = site.extra_headers
if site.proxy:
ydl_opts["proxy"] = "http://{}".format(site.proxy)
## XXX (sometimes?) causes chrome debug websocket to go through