1 |
commit: 091d066f082851d852b3ecfa6fca655dc486ef29 |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Dec 31 21:23:32 2014 +0000 |
4 |
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 1 02:39:52 2015 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/gentoo-keys.git;a=commit;h=091d066f |
7 |
|
8 |
gkeys/actions.py: Update docstrings and action options |
9 |
|
10 |
This in preparation for man pages during wiki help page editing. |
11 |
|
12 |
--- |
13 |
gkeys/gkeys/actions.py | 22 ++++++++++++++-------- |
14 |
1 file changed, 14 insertions(+), 8 deletions(-) |
15 |
|
16 |
diff --git a/gkeys/gkeys/actions.py b/gkeys/gkeys/actions.py |
17 |
index 7682dd2..178d16d 100644 |
18 |
--- a/gkeys/gkeys/actions.py |
19 |
+++ b/gkeys/gkeys/actions.py |
20 |
@@ -48,7 +48,7 @@ Action_Options = { |
21 |
'add-seed': ['nick', 'name', 'keydir', 'keys', 'fingerprint', 'category', 'uid'], |
22 |
'remove-seed': ['nick', 'name', 'keydir', 'keys', 'fingerprint', 'category'], |
23 |
'move-seed': ['nick', 'name', 'keydir', 'keys', 'fingerprint', 'category', 'dest'], |
24 |
- 'fetch-seed': ['nick', 'name', 'keydir', 'keys', 'fingerprint', 'category', 'keyring'], |
25 |
+ 'fetch-seed': ['nick', '1file', 'category', 'dest', 'signature', 'timestamp'], |
26 |
'list-seedfiles': [], |
27 |
'list-key': ['nick', 'name', 'keydir', 'keys', 'fingerprint', 'category', 'keyring', 'gpgsearch', 'keyid'], |
28 |
'install-key': ['nick', 'name', 'keydir', 'keys', 'fingerprint', 'category', 'keyring', '1file'], |
29 |
@@ -59,7 +59,7 @@ Action_Options = { |
30 |
'search-key': ['nick', '1name', 'keydir', 'keys', 'fingerprint', 'keyid', 'uid', 'category', 'exact', 'all'], |
31 |
'verify': ['dest', 'nick', 'name', 'keydir', 'keys', 'fingerprint', 'category', '1file', 'signature', 'timestamp'], |
32 |
'check-key': ['nick', 'name', 'keydir', 'keys', 'fingerprint', 'category', 'keyring', 'keyid'], |
33 |
- 'sign': ['nick', 'name', 'keydir', 'fingerprint', 'file', 'keyring'], |
34 |
+ 'sign': ['nick', 'name', 'fingerprint', 'file', ], |
35 |
'spec-check': ['nick', 'name', 'keydir', 'keys', 'fingerprint', 'category', 'keyring', 'keyid'], |
36 |
'refresh-key': ['nick', 'name', 'keydir', 'keys', 'fingerprint', 'category', 'keyring', 'keyid'], |
37 |
'---general---': [], |
38 |
@@ -176,7 +176,7 @@ class Actions(object): |
39 |
|
40 |
|
41 |
def removeseed(self, args): |
42 |
- '''Remove a key from the selected seed file(s)''' |
43 |
+ '''Remove a seed from the selected seed file''' |
44 |
gkeys = self.listseed(args)[1] |
45 |
if not gkeys: |
46 |
return (False, ["Failed to remove seed: No gkeys returned from listseed()", |
47 |
@@ -365,7 +365,9 @@ class Actions(object): |
48 |
|
49 |
|
50 |
def checkkey(self, args): |
51 |
- '''Check keys actions''' |
52 |
+ '''Check keys actions |
53 |
+ Performs basic validity checks on the key(s), checks expiry, |
54 |
+ and presence of a signing sub-key''' |
55 |
if not args.category: |
56 |
return (False, ["Please specify seeds category."]) |
57 |
self.logger.debug("ACTIONS: checkkey; args: %s" % str(args)) |
58 |
@@ -413,7 +415,7 @@ class Actions(object): |
59 |
|
60 |
|
61 |
def speccheck(self, args): |
62 |
- '''Check keys actions''' |
63 |
+ '''Check if keys meet specifications requirements''' |
64 |
if not args.category: |
65 |
return (False, ["Please specify seeds category."]) |
66 |
self.logger.debug("ACTIONS: speccheck; args: %s" % str(args)) |
67 |
@@ -660,9 +662,13 @@ class Actions(object): |
68 |
|
69 |
|
70 |
def verify(self, args, messages=None): |
71 |
- '''File verification action |
72 |
+ '''File verification action. |
73 |
+ Note: If the specified key/keyring to verify against does not contain |
74 |
+ the key used to sign the file. It will Auto-search for the correct key |
75 |
+ in the installed keys db. And verify against the matching key.''' |
76 |
|
77 |
- @ param args: argparse.parse_args instance |
78 |
+ ''' |
79 |
+ @param args: argparse.parse_args instance |
80 |
@param messages: list, private internal option used for recursion only |
81 |
''' |
82 |
if messages == None: |
83 |
@@ -877,7 +883,7 @@ class Actions(object): |
84 |
|
85 |
|
86 |
def key_search(self, args, data_only=False): |
87 |
- '''Search for a key's seed field in the installed keys db''' |
88 |
+ '''Search for a key's seed in the installed keys db''' |
89 |
handler = SeedHandler(self.logger, self.config) |
90 |
results = {} |
91 |
search_args = [x for x in |