Truncating the Reasons column in CLI output if it is too long
Resolves: rhbz#2217999 Signed-off-by: Jiri Podivin <jpodivin@redhat.com> Change-Id: I29aa2e42ebe6df62ff69db2242a27a6096ee2fc4
This commit is contained in:
parent
70c3ac1d14
commit
7083d2ab4c
@ -78,6 +78,8 @@ def print_dict(data):
|
||||
if row.get('Status'):
|
||||
status = row.get('Status')
|
||||
row['Status'] = colors.color_output(status, status=status)
|
||||
if row.get('Reasons') and len(row['Reasons']) > 80:
|
||||
row['Reasons'] = row['Reasons'][:80] + '...(output truncated, see logs for full output)'
|
||||
table.add_row(row.values())
|
||||
print(table)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user