Merge "Truncating the Reasons column in CLI output if it is too long"

This commit is contained in:
Zuul 2023-08-02 11:45:40 +00:00 committed by Gerrit Code Review
commit fbd4983d56

View File

@ -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)