1 |
commit: 9f19528a9d61517cb262081b2cf28a3c2d5ee95b |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Apr 20 17:48:15 2015 +0000 |
4 |
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun May 31 04:45:22 2015 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gentoo-keys.git/commit/?id=9f19528a |
7 |
|
8 |
gkeys/actions.py: Seed handling fixes |
9 |
|
10 |
Update for newer listseed() data returned. |
11 |
|
12 |
gkeys/gkeys/actions.py | 12 ++++++++---- |
13 |
1 file changed, 8 insertions(+), 4 deletions(-) |
14 |
|
15 |
diff --git a/gkeys/gkeys/actions.py b/gkeys/gkeys/actions.py |
16 |
index 80c3c72..d467500 100644 |
17 |
--- a/gkeys/gkeys/actions.py |
18 |
+++ b/gkeys/gkeys/actions.py |
19 |
@@ -98,7 +98,8 @@ class Actions(object): |
20 |
def addseed(self, args): |
21 |
'''Add or replace a key in the selected seed file''' |
22 |
handler = SeedHandler(self.logger, self.config) |
23 |
- success, gkeys = self.listseed(args)[1] |
24 |
+ success, data = self.listseed(args) |
25 |
+ gkeys = data[1] |
26 |
if not args.nick or not args.name or not args.keys or not args.keydir: |
27 |
return (False, ["Provide a nickname, a name and a public key fingerprint (-K, --keys)."]) |
28 |
if not args.fingerprint: |
29 |
@@ -126,7 +127,8 @@ class Actions(object): |
30 |
|
31 |
def removeseed(self, args): |
32 |
'''Remove a seed from the selected seed file''' |
33 |
- success, gkeys = self.listseed(args)[1] |
34 |
+ success, data = self.listseed(args) |
35 |
+ gkeys = data[1] |
36 |
if not gkeys: |
37 |
return (False, ["Failed to remove seed: No gkeys returned from listseed()", |
38 |
[]]) |
39 |
@@ -249,7 +251,8 @@ class Actions(object): |
40 |
def installkey(self, args): |
41 |
'''Install a key from the seed(s)''' |
42 |
self.logger.debug("ACTIONS: installkey; args: %s" % str(args)) |
43 |
- success, gkeys = self.listseed(args)[1] |
44 |
+ success, data = self.listseed(args) |
45 |
+ gkeys = data[1] |
46 |
if gkeys: |
47 |
if gkeys and not args.nick == '*' and self.output: |
48 |
self.output(['', gkeys], "\n Found GKEY seeds:") |
49 |
@@ -593,7 +596,8 @@ class Actions(object): |
50 |
self.logger.debug(_unicode("ACTIONS: importkey; catdir = %s") |
51 |
% catdir) |
52 |
self.gpg = GkeysGPG(self.config, catdir, self.logger) |
53 |
- success, gkeys = self.listseed(args)[1] |
54 |
+ success, data = self.listseed(args) |
55 |
+ gkeys = data[1] |
56 |
results = {} |
57 |
failed = [] |
58 |
print("Importing specified keys to keyring.") |