aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/YoutubeDL.py
diff options
context:
space:
mode:
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')