diff options
author | Lars Wirzenius <liw@liw.fi> | 2011-08-02 18:22:31 +0100 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2011-08-02 18:22:31 +0100 |
commit | fec1dccfd3c3c4dcf543adb6741b070c415ace63 (patch) | |
tree | 8db5f9024ae90441f99684036c08df92ec94ebe5 | |
parent | 9c4ca6f1ddc482ed2ef82b041737aa86e5bd26f9 (diff) | |
download | seivot-fec1dccfd3c3c4dcf543adb6741b070c415ace63.tar.gz |
Sort within a group in find_groups.
-rwxr-xr-x | seivots-summary | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/seivots-summary b/seivots-summary index 4425c54..ad4fde0 100755 --- a/seivots-summary +++ b/seivots-summary @@ -99,7 +99,6 @@ class SeivotsSummary(cliapp.Application): filename) for group, caption in self.find_groups(seivots): - group.sort(key=self.getkey) for op in ['backup', 'restore', 'list_files', 'forget']: table = self.make_table(group, op) table.caption = '%s: %s' % (op, caption) @@ -198,6 +197,9 @@ class SeivotsSummary(cliapp.Application): k = key(seivot) groups[k] = groups.get(k, []) + [seivot] + for group in groups.values(): + group.sort(key=self.getkey) + result = [(groups[k], caption(groups[k][0])) for k in groups] result.sort(key=lambda t: t[1]) return result |