From 224864baceb214d830382800fc6b7779b75e389a Mon Sep 17 00:00:00 2001 From: j Date: Mon, 19 May 2014 01:50:05 +0200 Subject: [PATCH] timeout --- oml/nodes.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/oml/nodes.py b/oml/nodes.py index 8bdbfb6..2739a5b 100644 --- a/oml/nodes.py +++ b/oml/nodes.py @@ -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()