1 |
commit: 7813ed25a711a2e13d3f9dcf0896e5b45db69501 |
2 |
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Dec 30 18:42:40 2014 +0000 |
4 |
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Dec 30 22:07:04 2014 +0000 |
6 |
URL: http://sources.gentoo.org/gitweb/?p=proj/gentoo-keys.git;a=commit;h=7813ed25 |
7 |
|
8 |
gkeys/base.py: Sort the _option_* functions |
9 |
|
10 |
--- |
11 |
gkeys/gkeys/base.py | 101 +++++++++++++++++++++++++++------------------------- |
12 |
1 file changed, 53 insertions(+), 48 deletions(-) |
13 |
|
14 |
diff --git a/gkeys/gkeys/base.py b/gkeys/gkeys/base.py |
15 |
index 2ec4375..c9faf0e 100644 |
16 |
--- a/gkeys/gkeys/base.py |
17 |
+++ b/gkeys/gkeys/base.py |
18 |
@@ -46,15 +46,40 @@ class CliBase(object): |
19 |
|
20 |
|
21 |
@staticmethod |
22 |
+ def _option_status(parser=None): |
23 |
+ parser.add_argument('-A', '--status', action='store_true', |
24 |
+ default=False, |
25 |
+ help='The active status of the member') |
26 |
+ |
27 |
+ @staticmethod |
28 |
def _option_all(parser=None): |
29 |
parser.add_argument('-a', '--all', dest='all', |
30 |
action='store_true', default=False, |
31 |
help='Match all inputs arguments in searches') |
32 |
|
33 |
@staticmethod |
34 |
+ def _option_category(parser=None): |
35 |
+ parser.add_argument('-C', '--category', |
36 |
+ dest='category', default=None, |
37 |
+ help='The key or seed directory category to use or update') |
38 |
+ |
39 |
+ @staticmethod |
40 |
+ def _option_cleankey(parser=None): |
41 |
+ parser.add_argument('--clean-key', |
42 |
+ dest='cleankey', default=False, |
43 |
+ help='Clean the key from the keyring due to failures') |
44 |
+ |
45 |
+ @staticmethod |
46 |
+ def _option_cleanseed(parser=None): |
47 |
+ parser.add_argument('--clean-seed', |
48 |
+ dest='cleanseed', default=False, |
49 |
+ help='Clean the seed from the seedfile due to failures. ' |
50 |
+ 'Used during binary keyring release creation.') |
51 |
+ |
52 |
+ @staticmethod |
53 |
def _option_dest(parser=None): |
54 |
parser.add_argument('-d', '--dest', dest='destination', default=None, |
55 |
- help='The destination seed file or keydir for move, copy operations') |
56 |
+ help='The destination for move, copy, create operations') |
57 |
|
58 |
@staticmethod |
59 |
def _option_exact(parser=None): |
60 |
@@ -63,6 +88,17 @@ class CliBase(object): |
61 |
help='Use CASE matching in searches') |
62 |
|
63 |
@staticmethod |
64 |
+ def _option_file(parser=None): |
65 |
+ parser.add_argument('-F', '--file', dest='filename', default=None, |
66 |
+ nargs='+', |
67 |
+ help='The path/URL to use for the (signed) file') |
68 |
+ |
69 |
+ @staticmethod |
70 |
+ def _option_1file(parser=None): |
71 |
+ parser.add_argument('-F', '--file', dest='filename', default=None, |
72 |
+ help='The path/URL to use for the (signed) file') |
73 |
+ |
74 |
+ @staticmethod |
75 |
def _option_fingerprint(parser=None): |
76 |
parser.add_argument('-f', '--fingerprint', dest='fingerprint', |
77 |
default=None, nargs='+', |
78 |
@@ -74,12 +110,23 @@ class CliBase(object): |
79 |
help='Do a gpg search operations, rather than a gkey search') |
80 |
|
81 |
@staticmethod |
82 |
+ def _option_homedir(parser=None): |
83 |
+ parser.add_argument('-H', '--homedir', dest='homedir', default=None, |
84 |
+ help='The destination for the generated key') |
85 |
+ |
86 |
+ @staticmethod |
87 |
def _option_keyid(parser=None): |
88 |
parser.add_argument('-i', '--keyid', dest='keyid', default=None, |
89 |
nargs='+', |
90 |
help='The long keyid of the gpg key to search for') |
91 |
|
92 |
@staticmethod |
93 |
+ def _option_justdoit(parser=None): |
94 |
+ parser.add_argument('--justdoit', dest='justdoit', |
95 |
+ action='store_true', default=False, |
96 |
+ help='Just Do It') |
97 |
+ |
98 |
+ @staticmethod |
99 |
def _option_keyring(parser=None): |
100 |
parser.add_argument('-k', '--keyring', dest='keyring', default=None, |
101 |
help='The name of the keyring to use for verification, etc.') |
102 |
@@ -91,6 +138,11 @@ class CliBase(object): |
103 |
help='The name of the keyring to use for verification, etc.') |
104 |
|
105 |
@staticmethod |
106 |
+ def _option_mail(parser=None): |
107 |
+ parser.add_argument('-m', '--mail', dest='mail', default=None, |
108 |
+ help='The email address to search for') |
109 |
+ |
110 |
+ @staticmethod |
111 |
def _option_nick(parser=None): |
112 |
parser.add_argument('-n', '--nick', dest='nick', default=None, |
113 |
help='The nick associated with the the key') |
114 |
@@ -106,25 +158,6 @@ class CliBase(object): |
115 |
default=None, help='The name of the the key') |
116 |
|
117 |
@staticmethod |
118 |
- def _option_category(parser=None): |
119 |
- parser.add_argument('-C', '--category', |
120 |
- dest='category', default=None, |
121 |
- help='The key or seed directory category to use or update') |
122 |
- |
123 |
- @staticmethod |
124 |
- def _option_cleankey(parser=None): |
125 |
- parser.add_argument('--clean-key', |
126 |
- dest='cleankey', default=False, |
127 |
- help='Clean the key from the keyring due to failures') |
128 |
- |
129 |
- @staticmethod |
130 |
- def _option_cleanseed(parser=None): |
131 |
- parser.add_argument('--clean-seed', |
132 |
- dest='cleanseed', default=False, |
133 |
- help='Clean the seed from the seedfile due to failures. ' |
134 |
- 'Used during binary keyring release creation.') |
135 |
- |
136 |
- @staticmethod |
137 |
def _option_keydir(parser=None): |
138 |
parser.add_argument('-r', '--keydir', dest='keydir', default=None, |
139 |
help='The keydir to use, update or search for/in') |
140 |
@@ -135,17 +168,6 @@ class CliBase(object): |
141 |
help='The seedfile to use from the gkeys.conf file') |
142 |
|
143 |
@staticmethod |
144 |
- def _option_file(parser=None): |
145 |
- parser.add_argument('-F', '--file', dest='filename', default=None, |
146 |
- nargs='+', |
147 |
- help='The path/URL to use for the (signed) file') |
148 |
- |
149 |
- @staticmethod |
150 |
- def _option_1file(parser=None): |
151 |
- parser.add_argument('-F', '--file', dest='filename', default=None, |
152 |
- help='The path/URL to use for the (signed) file') |
153 |
- |
154 |
- @staticmethod |
155 |
def _option_signature(parser=None): |
156 |
parser.add_argument('-s','--signature', dest='signature', default=None, |
157 |
help='The path/URL to use for the signature') |
158 |
@@ -157,23 +179,6 @@ class CliBase(object): |
159 |
help='Turn on timestamp use') |
160 |
|
161 |
@staticmethod |
162 |
- def _option_mail(parser=None): |
163 |
- parser.add_argument('-m', '--mail', dest='mail', default=None, |
164 |
- help='The email address to search for') |
165 |
- |
166 |
- @staticmethod |
167 |
- def _option_status(parser=None): |
168 |
- parser.add_argument('-A', '--status', action='store_true', |
169 |
- default=False, |
170 |
- help='The active status of the member') |
171 |
- |
172 |
- @staticmethod |
173 |
- def _option_justdoit(parser=None): |
174 |
- parser.add_argument('--justdoit', dest='justdoit', |
175 |
- action='store_true', default=False, |
176 |
- help='Just Do It') |
177 |
- |
178 |
- @staticmethod |
179 |
def _option_uid(parser=None): |
180 |
parser.add_argument('-u', '--uid', dest='uid', nargs='*', default=None, |
181 |
help='The user ID, gpg key uid') |