From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3B4DC139085 for ; Sat, 24 Dec 2016 09:13:31 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6B70E2340E5; Sat, 24 Dec 2016 09:13:25 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 483D52340E4 for ; Sat, 24 Dec 2016 09:13:25 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 32376341229 for ; Sat, 24 Dec 2016 09:13:19 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3D16A24EE for ; Sat, 24 Dec 2016 09:13:16 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1482555254.5a6dac0bcbcdda558b8b828ceb1e6f3d04d95ada.dolsen@gentoo> Subject: [gentoo-commits] proj/gentoo-keys:gsoc-2016 commit in: gkeys/gkeys/ X-VCS-Repository: proj/gentoo-keys X-VCS-Files: gkeys/gkeys/action_map.py gkeys/gkeys/base.py X-VCS-Directories: gkeys/gkeys/ X-VCS-Committer: dolsen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 5a6dac0bcbcdda558b8b828ceb1e6f3d04d95ada X-VCS-Branch: gsoc-2016 Date: Sat, 24 Dec 2016 09:13:16 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 946c4006-636b-417b-a8eb-fcf45601baed X-Archives-Hash: 2e573437930754dbb408afb29308b771 commit: 5a6dac0bcbcdda558b8b828ceb1e6f3d04d95ada Author: aeroniero33 gmail com> AuthorDate: Sat Aug 27 14:05:41 2016 +0000 Commit: Brian Dolbec gentoo org> CommitDate: Sat Dec 24 04:54:14 2016 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-keys.git/commit/?id=5a6dac0b 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) gkeys/gkeys/action_map.py | 2 +- gkeys/gkeys/base.py | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) 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