From: Kefu Chai Date: Tue, 14 Oct 2025 13:26:06 +0000 (+0800) Subject: cephadm/build: Fix _has_python_pip() function check X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=e7317a836a7ea6d0d6e923b3816c29a1e10a4d7c;p=ceph.git 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 --- diff --git a/src/cephadm/build.py b/src/cephadm/build.py index d86737dfd2a3e..bdc117e9d27c6 100755 --- a/src/cephadm/build.py +++ b/src/cephadm/build.py @@ -423,7 +423,7 @@ def _has_python_venv(executable): 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