catch another CalledProcessError

This commit is contained in:
Yuxiang Zhang 2019-07-04 21:31:19 +08:00 committed by GitHub
parent 3d5352b132
commit 94249cf07a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -122,7 +122,10 @@ def sync_repo(repo_url: str, local_dir: Path, tmpdir: Path):
for retry in range(3): for retry in range(3):
logging.info("Downloading {}".format(filename)) logging.info("Downloading {}".format(filename))
try:
err = curl_download(pkg_url, dst_file, md5=md5) err = curl_download(pkg_url, dst_file, md5=md5)
except sp.CalledProcessError:
err = 'CalledProcessError'
if err is None: if err is None:
break break
logging.error("Failed to download {}: {}".format(filename, err)) logging.error("Failed to download {}: {}".format(filename, err))