1 |
commit: 5a6dac0bcbcdda558b8b828ceb1e6f3d04d95ada |
2 |
Author: aeroniero33 <justthisthing <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Aug 27 14:05:41 2016 +0000 |
4 |
Commit: Brian Dolbec <dolsen <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Dec 24 04:54:14 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/gentoo-keys.git/commit/?id=5a6dac0b |
7 |
|
8 |
Added --user and --email args parameters for spec-check |
9 |
|
10 |
I added 2 `args` parameters called `--email` and `--user` in `base.py` |
11 |
to be given to spec-check in order for the script to run. |
12 |
(The `--user` is optional for the user to select with which account to login) |
13 |
|
14 |
gkeys/gkeys/action_map.py | 2 +- |
15 |
gkeys/gkeys/base.py | 9 +++++++++ |
16 |
2 files changed, 10 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/gkeys/gkeys/action_map.py b/gkeys/gkeys/action_map.py |
19 |
index 80c59fe..e4ea412 100644 |
20 |
--- a/gkeys/gkeys/action_map.py |
21 |
+++ b/gkeys/gkeys/action_map.py |
22 |
@@ -275,7 +275,7 @@ Do you really want to remove dolsen?[y/n]: y |
23 |
('spec-check', { |
24 |
'func': 'speccheck', |
25 |
'options': ['category', 'nick', 'name', 'fingerprint', 'keyid', 'keys', |
26 |
- 'keydir', 'keyring'], |
27 |
+ 'keydir', 'keyring', 'email', 'user'], |
28 |
'desc': '''Check if keys meet specifications requirements''', |
29 |
'long_desc': '''Check if keys meet specifications requirements''', |
30 |
'example': '''$ gkeys spec-check -C gentoo -n gkeys |
31 |
|
32 |
diff --git a/gkeys/gkeys/base.py b/gkeys/gkeys/base.py |
33 |
index 9b285e4..a0224c0 100644 |
34 |
--- a/gkeys/gkeys/base.py |
35 |
+++ b/gkeys/gkeys/base.py |
36 |
@@ -222,6 +222,15 @@ class CliBase(object): |
37 |
parser.add_argument('-u', '--uid', dest='uid', nargs='+', default=None, |
38 |
help='The user ID, gpg key uid') |
39 |
|
40 |
+ @staticmethod |
41 |
+ def _option_email(parser=None): |
42 |
+ parser.add_argument('-E', '--email', dest='email', default=None, |
43 |
+ help='Email parameter for sending email reminders') |
44 |
+ |
45 |
+ @staticmethod |
46 |
+ def _option_user(parser=None): |
47 |
+ parser.add_argument('-U', '--user', dest='user', default=None, |
48 |
+ help='User parameter for service login') |
49 |
|
50 |
def parse_args(self, argv): |
51 |
'''Parse a list of aruments |