From 94249cf07a074f149a15299322e45150cb8ca9c7 Mon Sep 17 00:00:00 2001 From: Yuxiang Zhang Date: Thu, 4 Jul 2019 21:31:19 +0800 Subject: [PATCH] catch another CalledProcessError --- anaconda.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/anaconda.py b/anaconda.py index e797af3..416c58b 100755 --- a/anaconda.py +++ b/anaconda.py @@ -122,7 +122,10 @@ def sync_repo(repo_url: str, local_dir: Path, tmpdir: Path): for retry in range(3): logging.info("Downloading {}".format(filename)) - err = curl_download(pkg_url, dst_file, md5=md5) + 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))