diff options
author | Lars Wirzenius <liw@liw.fi> | 2018-01-18 15:43:26 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2018-01-18 15:44:19 +0200 |
commit | 45cf63b8714ce28b55954f5ecdaf66034099bef9 (patch) | |
tree | 06c1bf241ac4a841d36a587cbd29dcd3db13d6fa /icktool | |
parent | 7b24d689ca2cd4c4effd77fff72334dd0930bd83 (diff) | |
download | ick2-45cf63b8714ce28b55954f5ecdaf66034099bef9.tar.gz |
Add: build status column to output of "icktool status"
Diffstat (limited to 'icktool')
-rwxr-xr-x | icktool | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -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] |