Skip to content
Snippets Groups Projects
Commit 8f08b712 authored by Moul's avatar Moul
Browse files

Merge branch '128_unexpected_timeout' into 'dev'

[fix] #128 TypeError: __init__() got an unexpected keyword argument 'timeout'

See merge request !88
parents 893faa8f 40c8cbdf
No related branches found
No related tags found
1 merge request!88[fix] #128 TypeError: __init__() got an unexpected keyword argument 'timeout'
......@@ -121,9 +121,9 @@ def post_request(ep, path, postdata):
url = "http://" + ep[address] + ":" + ep["port"] + "/" + path
if ep["port"] == "443":
url = "https://" + ep[address] + "/" + path
request = urllib.request.Request(url, bytes(postdata, 'utf-8'), timeout=CONNECTION_TIMEOUT)
request = urllib.request.Request(url, bytes(postdata, 'utf-8'))
try:
response = urllib.request.urlopen(request)
response = urllib.request.urlopen(request, timeout=CONNECTION_TIMEOUT)
except urllib.error.URLError as e:
print(e, file=stderr)
exit(1)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment