pass timeout and increase

This commit is contained in:
j 2016-03-01 20:31:38 +05:30
parent eb231baa62
commit dc65b74389

View file

@ -129,8 +129,7 @@ class Node(Thread):
self._opener.addheaders = list(zip(headers.keys(), headers.values()))
#logger.debug('headers: %s', self._opener.addheaders)
try:
self._opener.timeout = self.TIMEOUT
r = self._opener.open(url, data=content)
r = self._opener.open(url, data=content, timeout=self.TIMEOUT*2)
except urllib.error.HTTPError as e:
if e.code == 403:
logger.debug('403: %s (%s)', url, self.user_id)