Add default timeout

This commit is contained in:
Evelyn 2017-11-03 19:20:23 +00:00
parent 93862e0347
commit 31e53e8bc4

View file

@ -52,7 +52,7 @@ def get_url(url, **kwargs):
request.method = method
try:
response = urllib.request.urlopen(request)
response = urllib.request.urlopen(request, timeout=5)
except urllib.error.HTTPError as e:
traceback.print_exc()
if kwargs.get("code"):