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
|
|
@ -22,7 +22,7 @@ def help_full ():
|
|||
|
||||
|
||||
def getPage (s, p):
|
||||
conn = http.client.HTTPConnection(s)
|
||||
conn = http.client.HTTPConnection(s, timeout=10)
|
||||
try:
|
||||
conn.request("GET", p)
|
||||
except socket.gaierror:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue