Aggressive test timeout to catch hanging servers
authorPhilipp Hagemeister <phihag@phihag.de>
Sat, 12 Jan 2013 19:33:03 +0000 (20:33 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Sat, 12 Jan 2013 19:33:03 +0000 (20:33 +0100)
test/test_download.py

index 40d596fdf1cf2e4b596917f28ecf431ef024014a..e36774de97c09ddb49a99d6e9edba7b266eb998d 100644 (file)
@@ -26,6 +26,7 @@ cookie_processor = compat_urllib_request.HTTPCookieProcessor(jar)
 proxy_handler = compat_urllib_request.ProxyHandler()
 opener = compat_urllib_request.build_opener(proxy_handler, cookie_processor, YoutubeDLHandler())
 compat_urllib_request.install_opener(opener)
+socket.setdefaulttimeout(10)
 
 def _try_rm(filename):
     """ Remove a file if it exists """