Skip to content
This repository was archived by the owner on Aug 30, 2023. It is now read-only.

Commit 538e6ef

Browse files
committed
Add timeout setting
1 parent 4e57b4d commit 538e6ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ddnet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def getpoints():
4343
sl=0
4444
response=None
4545
try:
46-
response = urllib.request.urlopen('https://ddnet.tw/players/'+urllib.parse.quote(pname)+'/')
46+
response = urllib.request.urlopen('https://ddnet.tw/players/'+urllib.parse.quote(pname)+'/',timeout = 10)
4747
except urllib.error.HTTPError as e:
4848
if e.code==404:
4949
points[pname]=0

0 commit comments

Comments
 (0)