From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 8B0121389E2 for ; Mon, 22 Dec 2014 23:11:56 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AE011E099B; Mon, 22 Dec 2014 23:11:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id EA895E098E for ; Mon, 22 Dec 2014 23:11:44 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id E56E1340670 for ; Mon, 22 Dec 2014 23:11:43 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id CBC28D281 for ; Mon, 22 Dec 2014 23:11:39 +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: <1419093965.cd4e3490d0dcf0d3242ba87b3c63f35e642380f9.dol-sen@gentoo> Subject: [gentoo-commits] proj/gentoo-keys:master commit in: gkeys/ X-VCS-Repository: proj/gentoo-keys X-VCS-Files: gkeys/actions.py gkeys/base.py X-VCS-Directories: gkeys/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: cd4e3490d0dcf0d3242ba87b3c63f35e642380f9 X-VCS-Branch: master Date: Mon, 22 Dec 2014 23:11:39 +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: 2813257a-2fe1-4af8-bfd0-a16b25e7977a X-Archives-Hash: 2bf5567eb611a11deb8edc8eb21d8688 commit: cd4e3490d0dcf0d3242ba87b3c63f35e642380f9 Author: Brian Dolbec gentoo org> AuthorDate: Sat Dec 13 16:36:24 2014 +0000 Commit: Brian Dolbec gmail com> CommitDate: Sat Dec 20 16:46:05 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/gentoo-keys.git;a=commit;h=cd4e3490 gkeys/actions.py: Fix verify() traceback due to args.filename being a list Create _option_1file() for single filename acceptance The signature option takes only one sig. --- gkeys/actions.py | 6 +++--- gkeys/base.py | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/gkeys/actions.py b/gkeys/actions.py index 5b534cb..266db0f 100644 --- a/gkeys/actions.py +++ b/gkeys/actions.py @@ -30,19 +30,19 @@ Available_Actions = ['listseed', 'addseed', 'removeseed', 'moveseed', 'fetchseed 'refreshkey'] Action_Options = { - 'listseed': ['nick', 'name', 'keydir', 'fingerprint', 'seedfile', 'file'], + 'listseed': ['nick', 'name', 'keydir', 'fingerprint', 'seedfile', '1file'], 'addseed': ['nick', 'name', 'keydir', 'fingerprint', 'seedfile'], 'removeseed': ['nick', 'name', 'keydir', 'fingerprint', 'seedfile'], 'moveseed': ['nick', 'name', 'keydir', 'fingerprint', 'seedfile', 'dest'], 'fetchseed': ['nick', 'name', 'keydir', 'fingerprint', 'seedfile'], 'listseedfiles': [], 'listkey': ['nick', 'name', 'keydir', 'fingerprint', 'category', 'keyring', 'gpgsearch', 'keyid'], - 'installkey': ['nick', 'name', 'keydir', 'fingerprint', 'category', 'keyring', 'seedfile', 'file'], + 'installkey': ['nick', 'name', 'keydir', 'fingerprint', 'category', 'keyring', 'seedfile', '1file'], 'removekey': ['nick', 'name', 'keydir', 'fingerprint', 'category', 'keyring'], 'movekey': ['nick', 'name', 'keydir', 'fingerprint', 'category', 'keyring', 'dest'], 'installed': ['nick', 'name', 'keydir', 'fingerprint', 'category', 'keyring'], 'importkey': ['nick', 'name', 'keydir', 'fingerprint', 'category', 'keyring'], - 'verify': ['dest', 'nick', 'name', 'keydir', 'fingerprint', 'category', 'file', 'signature', 'keyring', 'timestamp'], + 'verify': ['dest', 'nick', 'name', 'keydir', 'fingerprint', 'category', '1file', 'signature', 'keyring', 'timestamp'], 'checkkey': ['nick', 'name', 'keydir', 'fingerprint', 'category', 'keyring', 'keyid'], 'sign': ['nick', 'name', 'keydir', 'fingerprint', 'file', 'keyring'], 'speccheck': ['nick', 'name', 'keydir', 'fingerprint', 'category', 'keyring', 'keyid'], diff --git a/gkeys/base.py b/gkeys/base.py index d3f8227..0ec8a03 100644 --- a/gkeys/base.py +++ b/gkeys/base.py @@ -113,6 +113,11 @@ class CliBase(object): help='The path/URL to use for the (signed) file') @staticmethod + def _option_1file(parser=None): + parser.add_argument('-F', '--file', dest='filename', default=None, + help='The path/URL to use for the (signed) file') + + @staticmethod def _option_signature(parser=None): parser.add_argument('-s','--signature', dest='signature', default=None, help='The path/URL to use for the signature')