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 <k.chai@proxmox.com>
def _has_python_pip(executable):
res = _run(
- [executable, '-m', 'venv', '--help'], stdout=subprocess.DEVNULL
+ [executable, '-m', 'pip', '--help'], stdout=subprocess.DEVNULL
)
return res.returncode == 0