def dsa_urlopen(*args, **kwargs):
 timeout = setting('SOCIAL_AUTH_URLOPEN_TIMEOUT')
 if (timeout and ('timeout' not in kwargs)):
  kwargs['timeout'] = timeout
 return urlopen(*args, **kwargs)

def dsa_urlopen ( * args , ** kwargs ) : timeout = setting ( 'SOCIAL_AUTH_URLOPEN_TIMEOUT' ) if ( timeout and ( 'timeout' not in kwargs ) ) : kwargs [ 'timeout' ] = timeout return urlopen ( * args , ** kwargs )
like urllib2 .