This commit is contained in:
j 2014-05-19 01:50:05 +02:00
parent d6f350e5a1
commit 224864bace
1 changed files with 2 additions and 2 deletions

View File

@ -34,7 +34,7 @@ class Node(object):
_cert = None
online = False
download_speed = 0
TIMEOUT = 3
TIMEOUT = 5
def __init__(self, nodes, user):
self._nodes = nodes
@ -248,7 +248,7 @@ class Node(object):
content = r.content
'''
self._opener.addheaders = zip(headers.keys(), headers.values())
r = self._opener.open(url, timeout=self.TIMEOUT)
r = self._opener.open(url, timeout=self.TIMEOUT*2)
if r.getcode() == 200:
if r.headers.get('content-encoding', None) == 'gzip':
content = gzip.GzipFile(fileobj=r).read()