libguestfs/SOURCES/0083-RHEL-8-use-platform-py...

39 lines
1.3 KiB
Diff
Raw Normal View History

From ccd28a6b0178c0bbd4a04e9a65932a9b3a1dbdd9 Mon Sep 17 00:00:00 2001
From: Pino Toscano <ptoscano@redhat.com>
Date: Sun, 16 Dec 2018 16:42:46 +0100
Subject: [PATCH] RHEL 8: use platform-python
Use the stable platform-python provided in BaseOS, instead of relying on
some arbitrary version installed by the user.
---
v2v/output_rhv_upload.ml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/v2v/output_rhv_upload.ml b/v2v/output_rhv_upload.ml
index 13c175f2d..f95ac0d65 100644
--- a/v2v/output_rhv_upload.ml
+++ b/v2v/output_rhv_upload.ml
@@ -78,7 +78,7 @@ let parse_output_options options =
{ rhv_cafile; rhv_cluster; rhv_direct; rhv_verifypeer }
-let python3 = "python3" (* Defined by PEP 394 *)
+let python3 = "/usr/libexec/platform-python"
let nbdkit_python_plugin = "python3"
let pidfile_timeout = 30
let finalization_timeout = 5*60
@@ -121,8 +121,8 @@ class output_rhv_upload output_alloc output_conn
(* Check that the Python binary is available. *)
let error_unless_python_binary_on_path () =
- try ignore (which python3)
- with Executable_not_found _ ->
+ try ignore (Unix.access python3 [Unix.X_OK])
+ with Unix_error _ ->
error (f_"no python binary called %s can be found on the $PATH")
python3
in
--
2.21.0