diff --git a/pyporter/pyporter.py b/pyporter/pyporter.py index 41425c4c046703b7ae95ac9720b2527a49547bdc..32b4b7b0119d9581f14277092e36dd7ced1a9e26 100755 --- a/pyporter/pyporter.py +++ b/pyporter/pyporter.py @@ -348,12 +348,13 @@ 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)}") + + rs = subprocess.call(["wget", s_url, "-P", tgtpath]) + if rs != 0: + logger.error(f"Failed to download source from:{s_url}") return False + else: + return True def prepare_rpm_build_env(root):