From 8cd6cc65f1bccf2056c11d87ce609b87b1cad484 Mon Sep 17 00:00:00 2001 From: Hayde Martinez Date: Mon, 27 May 2019 11:10:59 -0500 Subject: [PATCH] sm-dump output not formatted properly Using command: sudo sm-dump --impact --pid --pid_file pid column is not formatted properly and there is no space between pid and pid_file, this is due to pid's in linux can have up to 7 characters. This commit: a) Increases this field to 8 characters in order to fix format Test: Use "sudo sm-dump --impact --pid --pid_file" Closes-Bug: 1828045 Change-Id: I3966f12f68c6694078f8670962c0d4113b8820c6 Signed-off-by: Hayde Martinez --- service-mgmt-tools/sm-tools/sm_tools/sm_dump.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service-mgmt-tools/sm-tools/sm_tools/sm_dump.py b/service-mgmt-tools/sm-tools/sm_tools/sm_dump.py index 4f197930..52e91e62 100755 --- a/service-mgmt-tools/sm-tools/sm_tools/sm_dump.py +++ b/service-mgmt-tools/sm-tools/sm_tools/sm_dump.py @@ -116,7 +116,7 @@ def main(): if args.impact: msg += "%-10s" % (row[6]) if args.pid: - msg += "%-7s" % (pid if pid > 0 else '') + msg += "%-8s" % (pid if pid > 0 else '') if args.pn: msg += "%-20s" % (pn) if args.pid_file: @@ -172,7 +172,7 @@ def main(): if args.impact: msg += "%-10s" % (row[5]) if args.pid: - msg += "%-7s" % (pid if pid > 0 else '') + msg += "%-8s" % (pid if pid > 0 else '') if args.pn: msg += "%-20s" % (pn) if args.pid_file: