Ignore:
Timestamp:
08/12/13 18:44:19 (9 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

Removed the use of global 'socket.setdefaulttimeout'.

(fixes #1310).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Orange/utils/serverfiles.py

    r11438 r11653  
    114114import socket 
    115115 
    116 # timeout in seconds 
     116# default socket timeout in seconds 
    117117timeout = 120 
    118 socket.setdefaulttimeout(timeout) 
    119118 
    120119import urllib 
     
    409408                auth = base64.encodestring('%s:%s' % (self.username, self.password))[:-1]  
    410409                request.add_header('Authorization', 'Basic %s' % auth ) # Add Auth header to request 
    411              
    412             return opener.open(request) 
    413                  
     410 
     411            return opener.open(request, timeout=timeout) 
     412 
    414413        if repeat <= 0: 
    415414            return do() 
Note: See TracChangeset for help on using the changeset viewer.