From: crouzet Date: Tue, 4 Feb 2020 08:20:27 +0000 (+0100) Subject: adapt status for apt X-Git-Tag: 5.6.0~23^2~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3e76f1ea07330e68d26e4d22d0396f5b8be7700c;p=tools%2Fsat.git adapt status for apt --- diff --git a/src/system.py b/src/system.py index 1c11d5c..8836383 100644 --- a/src/system.py +++ b/src/system.py @@ -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