commit: 54c1719b1701ce9f4b5853b029a2e9bc9412db8e
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Tue Aug 25 14:05:26 2015 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Tue Aug 25 14:05:26 2015 +0000
URL: https://gitweb.gentoo.org/proj/gentoo-keys.git/commit/?id=54c1719b
actionbase.py: Fix sanity check in _set_category
pyGPG changed, it now returns None for a key/subkey that it fails to find.
Add a cat check as well.
gkeys/gkeys/actionbase.py | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gkeys/gkeys/actionbase.py b/gkeys/gkeys/actionbase.py
index e8d5ba4..c53bfdb 100644
--- a/gkeys/gkeys/actionbase.py
+++ b/gkeys/gkeys/actionbase.py
@@ -80,7 +80,9 @@ class ActionBase(object):
def _set_category(self, cat):
keyring = self.config.get_key('keyring')
- if "foo-bar'd" in keyring:
+ if not keyring:
+ raise
+ if not cat:
raise
self.category = cat
catdir = os.path.join(keyring, cat)