]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephadm/build: Fix _has_python_pip() function check 65934/head
authorKefu Chai <k.chai@proxmox.com>
Tue, 14 Oct 2025 13:26:06 +0000 (21:26 +0800)
committerKefu Chai <k.chai@proxmox.com>
Tue, 14 Oct 2025 13:50:35 +0000 (21:50 +0800)
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>
src/cephadm/build.py

index d86737dfd2a3ee67def167fc282593e701dde8d9..bdc117e9d27c642b2aec3f41a43dd8317f4ee746 100755 (executable)
@@ -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