]> SALOME platform Git repositories - tools/sat.git/commitdiff
Salome HOME
adapt status for apt
authorcrouzet <nicolas.crouzet@cea.fr>
Tue, 4 Feb 2020 08:20:27 +0000 (09:20 +0100)
committercrouzet <nicolas.crouzet@cea.fr>
Tue, 4 Feb 2020 08:20:27 +0000 (09:20 +0100)
src/system.py

index 1c11d5ce4f996649c9f47cde33e94f4efd18d9e2..8836383ab4e67dd2da2c33586e657bc2ed6b2a81 100644 (file)
@@ -370,10 +370,13 @@ def check_system_pkg(check_cmd,pkg):
     output, err = p.communicate()
     rc = p.returncode
     if rc==0:
-        msg_status="   - "+pkg + " : " + src.printcolors.printcSuccess("OK") +\
-                  " (" +  output.replace('\n',' ') + ")\n" # remove output trailing \n
+        check_res=src.printcolors.printcSuccess("OK")
+        if check_cmd[0]=="rpm": # apt output is too messy for being used
+            check_res+=" (" + output.replace('\n',' ') + ")\n" # remove output trailing \n
     else:
-        msg_status="   - "+pkg + " : " + src.printcolors.printcError("KO") +\
-                   " (package is not installed!)\n"
+        check_res=src.printcolors.printcError("KO") 
+        check_res+=" (package is not installed!)\n"
+
+    msg_status="\n   - "+pkg + " : " + check_res
     return msg_status