Skip to content

Commit 68361e7

Browse files
authored
Allow fallback to WinHTTP if BITS reports 'no internet' (#318)
Fixes #275
1 parent 567f4bc commit 68361e7

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/manage/urlutils.py

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -465,17 +465,8 @@ def on_progress(_): pass
465465
return _bits_urlretrieve(request)
466466
except ImportError:
467467
LOGGER.debug("BITS module unavailable - using fallback")
468-
except NoInternetError as ex:
468+
except NoInternetError:
469469
request.on_progress(None)
470-
try:
471-
from _native import winhttp_isconnected
472-
except ImportError:
473-
pass
474-
else:
475-
if not winhttp_isconnected():
476-
LOGGER.error("Failed to download. Please connect to the internet and try again.")
477-
raise RuntimeError("Failed to download. Please connect to the internet and try again.") from ex
478-
479470
LOGGER.verbose("Failed to download using BITS, " +
480471
"possibly due to no internet. Retrying with fallback method.")
481472
except FileNotFoundError:

0 commit comments

Comments
 (0)