commit: 9eb0f80f177fbba10308aa8e31e328a367bcb451
Author: Pavlos Ratis <dastergon <AT> gentoo <DOT> org>
AuthorDate: Sun Aug 17 22:03:18 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sun Aug 17 22:07:11 2014 +0000
URL:
http://sources.gentoo.org/gitweb/?p=proj/gentoo-keys.git;a=commit;h=9eb0f80f
add the ability to pass external results to check_keys
---
gkeys/lib.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gkeys/lib.py b/gkeys/lib.py
index 5f39cd3..4b4e975 100644
--- a/gkeys/lib.py
+++ b/gkeys/lib.py
@@ -208,13 +208,14 @@ class GkeysGPG(GPG):
return result
- def check_keys(self, keydir, keyid):
+ def check_keys(self, keydir, keyid, result=None):
'''Check specified or all keys based on the seed type
@param keydir: the keydir to list the keys for
@param keyid: the keyid to check
'''
- result = self.list_keys(keydir, colons=True)
+ if not result:
+ result = self.list_keys(keydir, colons=True)
revoked = expired = invalid = sign = False
for data in result.status.data:
if data.name == "PUB":