diff options
author | Lars Wirzenius <liw@liw.fi> | 2011-08-02 17:25:55 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2011-08-02 17:25:55 +0100 |
commit | cdce731982f390ef5d28d7161c481d2913de6375 (patch) | |
tree | bbe43624e5842772f62c211fc6c19e860be09d90 | |
parent | e56f6d3f24e0f295537c3f676b289be2c6f44c82 (diff) | |
download | seivot-cdce731982f390ef5d28d7161c481d2913de6375.tar.gz |
Show description if given.
-rwxr-xr-x | seivots-summary | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/seivots-summary b/seivots-summary index 12bbf69..c1a82cd 100755 --- a/seivots-summary +++ b/seivots-summary @@ -115,6 +115,7 @@ class SeivotsSummary(cliapp.Application): 'repo-writes': ('r-writes', 'MiB', '%.1f', self.get_repo_writes), 'repo-reads': ('r-reads', 'MiB', '%.1f', self.get_repo_reads), 'branch': ('branch', '', '%s', self.get_branch), + 'description': ('desc', '', '%s', self.get_description), } prefix = ('obnam-revno', 'larch-revno') @@ -132,7 +133,7 @@ class SeivotsSummary(cliapp.Application): ('gen0-time', 'gen0-ram', 'slowest-time', 'biggest-ram', 'repo-writes', 'repo-reads'), } - suffix = ('branch',) + suffix = ('branch', 'description') colnames = prefix + which[op] + suffix table = Table() @@ -190,6 +191,11 @@ class SeivotsSummary(cliapp.Application): def get_branch(self, seivot, op): return seivot.get('meta', 'branch') + + def get_description(self, seivot, op): + if seivot.has_option('meta', 'description'): + return seivot.get('meta', 'description') + return '' def get_gen0_speed(self, seivot, op): bytes = seivot.getfloat('0', 'backup.new-data') |