From 9851d4f82f4dad8a93afa7de2a3f7348b1f1905e Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sat, 7 Mar 2020 00:31:50 +0300 Subject: [PATCH] Improve the table header --- kconfig-hardened-check.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/kconfig-hardened-check.py b/kconfig-hardened-check.py index 4f01f57..85445b5 100755 --- a/kconfig-hardened-check.py +++ b/kconfig-hardened-check.py @@ -444,14 +444,15 @@ def print_checklist(checklist, with_results): print(json.dumps(opts)) return - # header - print('{:^45}|{:^13}|{:^10}|{:^20}'.format('option name', 'desired val', 'decision', 'reason'), end='') + # table header sep_line_len = 91 if with_results: - print('| {}'.format('check result'), end='') sep_line_len += 30 + print('=' * sep_line_len) + print('{:^45}|{:^13}|{:^10}|{:^20}'.format('option name', 'desired val', 'decision', 'reason'), end='') + if with_results: + print('| {}'.format('check result'), end='') print() - print('=' * sep_line_len) for opt in checklist: -- 2.31.1