Skip to content

Commit

Permalink
actionbase.py: Fix sanity check in _set_category
Browse files Browse the repository at this point in the history
pyGPG changed, it now returns None for a key/subkey that it fails to find.
Add a cat check as well.
  • Loading branch information
dol-sen committed Aug 25, 2015
1 parent 38d2b1f commit 54c1719
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gkeys/gkeys/actionbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,9 @@ def seedhandler(self):

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)
Expand Down

0 comments on commit 54c1719

Please sign in to comment.