From 1ba79d2bee268b1ad21881007fb703a230397153 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Wed, 20 Sep 2023 14:07:04 +0300 Subject: [PATCH] Re-instate for/else to avoid a raise after an error and a subsequent success --- winbuild/build_prepare.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/winbuild/build_prepare.py b/winbuild/build_prepare.py index 34bfaa964f3..20bb846bc63 100644 --- a/winbuild/build_prepare.py +++ b/winbuild/build_prepare.py @@ -443,8 +443,7 @@ def download_dep(url: str, file: str) -> None: break except urllib.error.URLError as e: ex = e - - if ex: + else: raise RuntimeError(ex)