1. biolab
  2. Untitled project
  3. orange

Source

orange / Orange / utils / serverfiles.py

Diff from to

File Orange/utils/serverfiles.py

 import sys
 import socket
 
-# timeout in seconds
+# default socket timeout in seconds
 timeout = 120
-socket.setdefaulttimeout(timeout)
 
 import urllib
 import urllib2
             if self._authen():
                 auth = base64.encodestring('%s:%s' % (self.username, self.password))[:-1] 
                 request.add_header('Authorization', 'Basic %s' % auth ) # Add Auth header to request
-            
-            return opener.open(request)
-                
+
+            return opener.open(request, timeout=timeout)
+
         if repeat <= 0:
             return do()
         else: