Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 446a2ab commit 45f9944Copy full SHA for 45f9944
Lib/ensurepip/__init__.py
@@ -24,15 +24,16 @@
24
25
def _find_wheel_pkg_dir_pip():
26
if _WHEEL_PKG_DIR is None:
27
+ # NOTE: The compile-time `WHEEL_PKG_DIR` is unset so there is no place
28
+ # NOTE: for looking up the wheels.
29
return None
30
31
dist_matching_wheels = _WHEEL_PKG_DIR.glob('pip-*.whl')
32
try:
33
last_matching_dist_wheel = sorted(dist_matching_wheels)[-1]
- except IndexError as index_err:
- raise LookupError(
34
- '`WHEEL_PKG_DIR` does not contain any wheel files for `pip`.',
35
- ) from index_err
+ except IndexError:
+ # NOTE: `WHEEL_PKG_DIR` does not contain any wheel files for `pip`.
36
+ return None
37
38
return nullcontext(last_matching_dist_wheel)
39
0 commit comments