aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
authorPhilipp Hagemeister <phihag@phihag.de>2013-12-02 13:37:05 +0100
committerPhilipp Hagemeister <phihag@phihag.de>2013-12-02 13:37:05 +0100
commit6ad14cab599b05a658756fef47d3837281429da7 (patch)
tree1e2a4210c5464e8a89b7894d74ff86751e21cfc4 /youtube_dl/YoutubeDL.py
parenta9be0cc736d63890413ced94ebb0d68a45730c97 (diff)
Add --socket-timeout option
Diffstat (limited to 'youtube_dl/YoutubeDL.py')
-rw-r--r--youtube_dl/YoutubeDL.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index b7393fd79..b68b110a4 100644
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -971,7 +971,9 @@ class YoutubeDL(object):
write_string(u'[debug] Proxy map: ' + compat_str(proxy_map) + u'\n')
def _setup_opener(self):
- timeout = float(self.params.get('socket_timeout', 600))
+ timeout_val = self.params.get('socket_timeout')
+ timeout = 600 if timeout_val is None else float(timeout_val)
+
opts_cookiefile = self.params.get('cookiefile')
opts_proxy = self.params.get('proxy')