Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 597940 - app-crypt/gkeys-0.2: gkeys check-key always exits unsuccessfully
Summary: app-crypt/gkeys-0.2: gkeys check-key always exits unsuccessfully
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: gentoo-keys (show other bugs)
Hardware: All All
: Normal normal (vote)
Deadline: 2020-05-19
Assignee: Gentoo-keys project
URL: https://github.com/gentoo/gentoo-keys...
Whiteboard:
Keywords: InVCS, PATCH, PMASKED
Depends on:
Blocks:
 
Reported: 2016-10-24 06:00 UTC by Zac Medico
Modified: 2020-05-23 09:31 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Zac Medico gentoo-dev 2016-10-24 06:00:08 UTC
From: Zac Medico <zmedico@gentoo.org>
Date: Sun, 23 Oct 2016 22:45:59 -0700
Subject: [PATCH] Actions.checkkey: fix success returncode

The failed dictionary contains lists for each type of failure,
so return success if all of those lists are emtpy.
---
 gkeys/gkeys/actions.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gkeys/gkeys/actions.py b/gkeys/gkeys/actions.py
index 1b27605..d51fb3f 100644
--- a/gkeys/gkeys/actions.py
+++ b/gkeys/gkeys/actions.py
@@ -13,6 +13,7 @@
 
 from __future__ import print_function
 
+import itertools
 import os
 import sys
 
@@ -360,7 +361,7 @@ class Actions(ActionBase):
             self.output([failed['invalid']], '\n Invalid keys:\n')
         if failed['sign']:
             self.output([failed['sign']], '\n No signing capable subkeys:\n')
-        return (len(failed) <1,
+        return (not any(itertools.chain.from_iterable(failed.values())),
             ['\nFound:\n-------', 'Expired: %d' % len(failed['expired']),
                 'Revoked: %d' % len(failed['revoked']),
                 'Invalid: %d' % len(failed['invalid']),
--
Comment 1 Brian Dolbec (RETIRED) gentoo-dev 2016-10-27 20:04:01 UTC
applied, thank you :)
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-04-19 12:12:30 UTC
app-crypt/gkeys is last rited now.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-05-23 09:31:22 UTC
Removing.