Skip to content

Commit 6bb5e57

Browse files
committed
fix(acbs/fetch.py): strictly determine whether 'sourceforge.net' in wget_download()
1 parent 320fd97 commit 6bb5e57

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

acbs/fetch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ def wget_download(url: str, full_path: str):
8686
url_info = urlparse(url)
8787
if os.path.exists(full_path) and not os.path.exists(flag_path):
8888
return
89-
if url_info.hostname.endswith('sourceforge.net'): # type: ignore # url_info is a urlparse() returned ParseResult, url_info.path type is always string.
90-
if url_info.path.endswith('/download') or (url_info.hostname == 'downloads.sourceforge.net'):
89+
if url_info.hostname == 'sourceforge.net':
90+
if url_info.path.endswith('/download'):
9191
url = url_info._replace(query='failedmirror=cyfuture.dl.sourceforge.net').geturl()
9292
else:
9393
url = url_info._replace(query='failedmirror=cyfuture.dl.sourceforge.net', path=url_info.path+'/download').geturl()

0 commit comments

Comments
 (0)