Skip to content

Commit e7317a8

Browse files
committed
cephadm/build: Fix _has_python_pip() function check
The _has_python_pip() function was incorrectly checking for the venv module instead of pip, causing it to always return the wrong result. This would prevent proper detection of whether pip is available during the cephadm build process. Fix by changing the module check from 'venv' to 'pip'. Signed-off-by: Kefu Chai <[email protected]>
1 parent af633b0 commit e7317a8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/cephadm/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ def _has_python_venv(executable):
423423

424424
def _has_python_pip(executable):
425425
res = _run(
426-
[executable, '-m', 'venv', '--help'], stdout=subprocess.DEVNULL
426+
[executable, '-m', 'pip', '--help'], stdout=subprocess.DEVNULL
427427
)
428428
return res.returncode == 0
429429

0 commit comments

Comments
 (0)