mirror of
https://github.com/tuna/tunasync-scripts.git
synced 2025-04-20 04:12:42 +00:00
catch CalledProcessError
This commit is contained in:
parent
f5341d4ccd
commit
39bc4a0d4a
@ -165,7 +165,11 @@ def sync_installer(repo_url, local_dir: Path):
|
||||
|
||||
for retry in range(3):
|
||||
logging.info("Downloading {}".format(filename))
|
||||
err = curl_download(pkg_url, dst_file, md5=md5)
|
||||
err = ''
|
||||
try:
|
||||
err = curl_download(pkg_url, dst_file, md5=md5)
|
||||
except sp.CalledProcessError:
|
||||
err = 'CalledProcessError'
|
||||
if err is None:
|
||||
break
|
||||
logging.error("Failed to download {}: {}".format(filename, err))
|
||||
|
Loading…
x
Reference in New Issue
Block a user