Gentoo Archives: gentoo-commits

From: Brian Dolbec <dolsen@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gentoo-keys:gsoc-2016 commit in: gkeys/gkeys/
Date: Sat, 24 Dec 2016 09:13:18
Message-Id: 1477288714.961f66af2d741386bc917de569153863e086732a.dolsen@gentoo
1 commit: 961f66af2d741386bc917de569153863e086732a
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Mon Oct 24 05:45:59 2016 +0000
4 Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 24 05:58:34 2016 +0000
6 URL: https://gitweb.gentoo.org/proj/gentoo-keys.git/commit/?id=961f66af
7
8 Actions.checkkey: fix success returncode
9
10 The failed dictionary contains lists for each type of failure,
11 so return success if all of those lists are emtpy.
12
13 gkeys/gkeys/actions.py | 3 ++-
14 1 file changed, 2 insertions(+), 1 deletion(-)
15
16 diff --git a/gkeys/gkeys/actions.py b/gkeys/gkeys/actions.py
17 index 1b27605..d51fb3f 100644
18 --- a/gkeys/gkeys/actions.py
19 +++ b/gkeys/gkeys/actions.py
20 @@ -13,6 +13,7 @@
21
22 from __future__ import print_function
23
24 +import itertools
25 import os
26 import sys
27
28 @@ -360,7 +361,7 @@ class Actions(ActionBase):
29 self.output([failed['invalid']], '\n Invalid keys:\n')
30 if failed['sign']:
31 self.output([failed['sign']], '\n No signing capable subkeys:\n')
32 - return (len(failed) <1,
33 + return (not any(itertools.chain.from_iterable(failed.values())),
34 ['\nFound:\n-------', 'Expired: %d' % len(failed['expired']),
35 'Revoked: %d' % len(failed['revoked']),
36 'Invalid: %d' % len(failed['invalid']),