From 3e76f1ea07330e68d26e4d22d0396f5b8be7700c Mon Sep 17 00:00:00 2001 From: crouzet Date: Tue, 4 Feb 2020 09:20:27 +0100 Subject: [PATCH] adapt status for apt --- src/system.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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 -- 2.39.2