Define a timeout for all http requests

This commit is contained in:
Némunaire 2012-07-27 18:18:13 +02:00
commit a2b273d09b
13 changed files with 12 additions and 12 deletions

View file

@ -23,7 +23,7 @@ class Tinyfier(threading.Thread):
self.msg.send_chn("La situation est embarassante, il semblerait que YCC soit down :(")
def getPage(s, p):
conn = http.client.HTTPConnection(s)
conn = http.client.HTTPConnection(s, timeout=10)
try:
conn.request("GET", p)
except socket.gaierror: