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

Commit c0aad47

Browse files
committed
fix timeout
1 parent ed8bf03 commit c0aad47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(self, url, code, reason, body):
4545
def http_get(url, timeout=HTTP_TIMEOUT):
4646
try:
4747
req = urllib.request.Request(url, headers={'User-Agent': USER_AGENT})
48-
return urllib.request.urlopen(req, timeout)
48+
return urllib.request.urlopen(req, timeout=timeout)
4949
except HTTPError as e:
5050
body = e.read().decode("utf-8")
5151
raise HTTPAccessError(url, e.code, e.reason, body)
@@ -125,7 +125,7 @@ def download(version, out_file):
125125

126126

127127
def main(args):
128-
command = args[0] if args else "default"
128+
command = args[0] if args else "all-versions"
129129
if command == "all-versions":
130130
versions = all_versions()
131131
print(" ".join(versions))

0 commit comments

Comments
 (0)