Browse Source

Aggressive test timeout to catch hanging servers

Philipp Hagemeister 12 years ago
parent
commit
d8bbf2018e
1 changed files with 1 additions and 0 deletions
  1. 1 0
      test/test_download.py

+ 1 - 0
test/test_download.py

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