Skip to content

Commit

Permalink
Wget: provide default filename is none provided on Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
mcgov committed Nov 11, 2024
1 parent fa372b0 commit 7098abd
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lisa/base_tools/wget.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ def get(
) -> str:
is_valid_url(url)

if not filename:
filename = urlparse(url).path.split("/")[-1]
self._log.debug(f"filename is not provided, use {filename} from url.")

file_path, download_path = self._ensure_download_path(file_path, filename)

# remove existing file and dir to download again.
Expand Down

0 comments on commit 7098abd

Please sign in to comment.