Define a timeout for all http requests
This commit is contained in:
parent
6d26a13752
commit
a2b273d09b
13 changed files with 12 additions and 12 deletions
|
|
@ -38,7 +38,7 @@ def parseanswer(msg):
|
|||
|
||||
|
||||
def getPage(terms):
|
||||
conn = http.client.HTTPConnection("www.crisco.unicaen.fr")
|
||||
conn = http.client.HTTPConnection("www.crisco.unicaen.fr", timeout=5)
|
||||
try:
|
||||
conn.request("GET", "/des/synonymes/%s" % quote(terms))
|
||||
except socket.gaierror:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue