diff --git a/python/paddle/utils/download.py b/python/paddle/utils/download.py index b9ca1f35976c63..9b7b40fc2a47a4 100644 --- a/python/paddle/utils/download.py +++ b/python/paddle/utils/download.py @@ -206,9 +206,16 @@ def _wget_download(url: str, fullname: str): # using wget to download url tmp_fullname = fullname + "_tmp" # –user-agent - command = f'wget -O {tmp_fullname} -t {DOWNLOAD_RETRY_LIMIT} {url}' + command = [ + 'wget', + '-O', + tmp_fullname, + '-t', + str(DOWNLOAD_RETRY_LIMIT), + url, + ] subprc = subprocess.Popen( - command, shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE + command, stdout=subprocess.PIPE, stderr=subprocess.PIPE ) _ = subprc.communicate()