Add default timeout
This commit is contained in:
parent
93862e0347
commit
31e53e8bc4
1 changed files with 1 additions and 1 deletions
2
Utils.py
2
Utils.py
|
@ -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"):
|
||||
|
|
Loading…
Reference in a new issue