From 278afe4fe0d11c68612d63aeb9b33b2bbe975d38 Mon Sep 17 00:00:00 2001 From: Caohongtao Date: Thu, 4 Jan 2024 08:11:44 +0000 Subject: [PATCH] update pyporter/pyporter.py. Signed-off-by: Caohongtao --- pyporter/pyporter.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/pyporter/pyporter.py b/pyporter/pyporter.py index 41425c4..d9dab65 100755 --- a/pyporter/pyporter.py +++ b/pyporter/pyporter.py @@ -348,12 +348,14 @@ def download_source(porter, tgtpath): if s_info.get("md5") == _hash: print("Same source file exists, skip") return True - try: - subprocess.call(["wget", s_url, "-P", tgtpath]) - return True - except Exception as e: - print(f"Failed to download source: {str(e)}") + + ret= subprocess.call(["wget", s_url, "-P", tgtpath]) + if ret!=0: + logger.error(f"Failed to download source from {s_url}...") + print(f"Failed to download source from {s_url}") return False + else: + return True def prepare_rpm_build_env(root): -- Gitee