commit: f5d3aca3ab6d36eebec84fcd2cd9af3ae8c2d4d2
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Mon Jan 5 00:57:28 2015 +0000
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
CommitDate: Mon Jan 5 22:15:18 2015 +0000
URL:
http://sources.gentoo.org/gitweb/?p=proj/gentoo-keys.git;a=commit;h=f5d3aca3
gkeys/actions.py: Fix self.listseed() return assignments
---
gkeys/gkeys/actions.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/gkeys/gkeys/actions.py b/gkeys/gkeys/actions.py
index cfcc038..9986adc 100644
--- a/gkeys/gkeys/actions.py
+++ b/gkeys/gkeys/actions.py
@@ -90,7 +90,7 @@ class Actions(object):
def addseed(self, args):
'''Add or replace a key in the selected seed file'''
handler = SeedHandler(self.logger, self.config)
- gkeys = self.listseed(args)[1]
+ success, gkeys = self.listseed(args)[1]
if not args.nick or not args.name or not args.keys or not args.keydir:
return (False, ["Provide a nickname, a name and a public key
fingerprint (-K, --keys)."])
if not args.fingerprint:
@@ -101,7 +101,7 @@ class Actions(object):
if not gkey:
return (False, ["Failed to create a valid GKEY instance.",
"Check for invalid data entries"])
- if len(gkeys[1]) == 0:
+ if len(gkeys) == 0:
self.logger.debug("ACTIONS: installkey; now adding gkey: %s" %
str(gkey))
success = self.seeds.add(getattr(gkey, 'nick'), gkey)
if success:
@@ -116,7 +116,7 @@ class Actions(object):
def removeseed(self, args):
'''Remove a seed from the selected seed file'''
- gkeys = self.listseed(args)[1]
+ success, gkeys = self.listseed(args)[1]
if not gkeys:
return (False, ["Failed to remove seed: No gkeys returned from
listseed()",
[]])