From a532f60ed3043de6ea64a021dea414b6b429e51b Mon Sep 17 00:00:00 2001 From: Steve Dower Date: Wed, 15 Apr 2026 19:49:15 +0100 Subject: [PATCH] Allow fallback to WinHTTP if BITS reports 'no internet' Fixes #275 --- src/manage/urlutils.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/src/manage/urlutils.py b/src/manage/urlutils.py index 47d78d4..612fc8f 100644 --- a/src/manage/urlutils.py +++ b/src/manage/urlutils.py @@ -465,17 +465,8 @@ def on_progress(_): pass return _bits_urlretrieve(request) except ImportError: LOGGER.debug("BITS module unavailable - using fallback") - except NoInternetError as ex: + except NoInternetError: request.on_progress(None) - try: - from _native import winhttp_isconnected - except ImportError: - pass - else: - if not winhttp_isconnected(): - LOGGER.error("Failed to download. Please connect to the internet and try again.") - raise RuntimeError("Failed to download. Please connect to the internet and try again.") from ex - LOGGER.verbose("Failed to download using BITS, " + "possibly due to no internet. Retrying with fallback method.") except FileNotFoundError: