Commit 0bff1b4f authored by Łukasz Nowak's avatar Łukasz Nowak

Configure timeout.

parent 21d5511c
......@@ -83,10 +83,11 @@ def Facebook_checkUserExistence(self):
return False
access_token = access_token_dict.get('access_token')
url = urlparse.urlsplit(self.portal_preferences.getPreferredVifibRestApiLoginCheck())
connection_kw = {'host': url.netloc, 'timeout': 5}
if url.scheme == 'http':
connection = httplib.HTTPConnection(url.netloc)
connection = httplib.HTTPConnection(connection_kw)
else:
connection = httplib.HTTPSConnection(url.netloc)
connection = httplib.HTTPSConnection(connection_kw)
connection.request('GET', url.path, headers = {
'Authorization' : 'Facebook %s' % access_token,
'Accept': 'application/json'})
......
386
\ No newline at end of file
387
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment