From 45cf63b8714ce28b55954f5ecdaf66034099bef9 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 18 Jan 2018 15:43:26 +0200 Subject: Add: build status column to output of "icktool status" --- icktool | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'icktool') diff --git a/icktool b/icktool index 494c85c..3ad8c60 100755 --- a/icktool +++ b/icktool @@ -134,6 +134,7 @@ class Icktool(cliapp.Application): build = { 'build_id': 'never', 'log': 'none', + 'status': 'n/a', } status = self._get_pipeline_status( project['project'], pipeline) @@ -142,10 +143,12 @@ class Icktool(cliapp.Application): 'pipeline': pipeline, 'build_id': build['build_id'], 'status': status['status'], + 'build_status': build['status'], 'log': build['log'], } rows.append(row) - self._pretty_table(rows, ['project', 'pipeline', 'status', 'log']) + self._pretty_table( + rows, ['project', 'pipeline', 'status', 'build_status', 'log']) def _get_projects(self): rc = self._new_rc('/projects', 'project') @@ -376,7 +379,7 @@ class Icktool(cliapp.Application): for row in [headings] + rows: for column in columns: - widths[column] = max(widths[column], len(row[column])) + widths[column] = max(widths[column], len(str(row[column]))) underlines = { column: '-' * widths[column] -- cgit v1.2.1