path: root/gkeys
diff options
authoraeroniero33 <justthisthing@gmail.com>2016-08-27 14:05:41 +0000
committerBrian Dolbec <dolsen@gentoo.org>2018-07-06 22:22:07 -0700
commit7b5f4e1f561e380dd635d9e97c32d53775a94eb9 (patch)
tree41f52a6e8cf3594c99b9fbd6d6cfebbe67e1cad0 /gkeys
parentCreated email.conf and setup the config files needed for the email reminders (diff)
Added --user and --email args parameters for spec-check
I added 2 `args` parameters called `--email` and `--user` in `base.py` to be given to spec-check in order for the script to run. (The `--user` is optional for the user to select with which account to login)
Diffstat (limited to 'gkeys')
2 files changed, 10 insertions, 1 deletions
diff --git a/gkeys/gkeys/action_map.py b/gkeys/gkeys/action_map.py
index 80c59fe..e4ea412 100644
--- a/gkeys/gkeys/action_map.py
+++ b/gkeys/gkeys/action_map.py
@@ -275,7 +275,7 @@ Do you really want to remove dolsen?[y/n]: y
('spec-check', {
'func': 'speccheck',
'options': ['category', 'nick', 'name', 'fingerprint', 'keyid', 'keys',
- 'keydir', 'keyring'],
+ 'keydir', 'keyring', 'email', 'user'],
'desc': '''Check if keys meet specifications requirements''',
'long_desc': '''Check if keys meet specifications requirements''',
'example': '''$ gkeys spec-check -C gentoo -n gkeys
diff --git a/gkeys/gkeys/base.py b/gkeys/gkeys/base.py
index 9b285e4..a0224c0 100644
--- a/gkeys/gkeys/base.py
+++ b/gkeys/gkeys/base.py
@@ -222,6 +222,15 @@ class CliBase(object):
parser.add_argument('-u', '--uid', dest='uid', nargs='+', default=None,
help='The user ID, gpg key uid')
+ @staticmethod
+ def _option_email(parser=None):
+ parser.add_argument('-E', '--email', dest='email', default=None,
+ help='Email parameter for sending email reminders')
+ @staticmethod
+ def _option_user(parser=None):
+ parser.add_argument('-U', '--user', dest='user', default=None,
+ help='User parameter for service login')
def parse_args(self, argv):
'''Parse a list of aruments