[Libguestfs] [PATCH 2/3] utils: remove unused run_python function

Pino Toscano ptoscano at redhat.com
Thu Feb 18 14:18:57 UTC 2016


No more used since the supermin 5 rewrite; RPM code either directly
invoked rpm(1), or now uses librpm.
---
 src/utils.ml  | 9 ---------
 src/utils.mli | 5 -----
 2 files changed, 14 deletions(-)

diff --git a/src/utils.ml b/src/utils.ml
index 7ae24bd..87c9cf7 100644
--- a/src/utils.ml
+++ b/src/utils.ml
@@ -85,15 +85,6 @@ let run_shell code args =
     exit 1
   )
 
-let run_python code args =
-  let cmd = sprintf "python -c %s %s"
-    (Filename.quote code)
-    (String.concat " " (List.map Filename.quote args)) in
-  if Sys.command cmd <> 0 then (
-    eprintf "supermin: external python program failed, see earlier error messages\n";
-    exit 1
-  )
-
 let rec find s sub =
   let len = String.length s in
   let sublen = String.length sub in
diff --git a/src/utils.mli b/src/utils.mli
index 7896e34..1a7687a 100644
--- a/src/utils.mli
+++ b/src/utils.mli
@@ -49,11 +49,6 @@ val run_shell : string -> string list -> unit
       This does not return anything, but exits with an error message
       if the shell code returns an error. *)
 
-val run_python : string -> string list -> unit
-  (** [run_python code args] runs Python [code] with arguments [args].
-      This does not return anything, but exits with an error message
-      if the Python code returns an error. *)
-
 val (//) : string -> string -> string
   (** [x // y] concatenates file paths [x] and [y] into a single path. *)
 
-- 
2.5.0




More information about the Libguestfs mailing list