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 CD60D138ACF for ; Fri, 26 Dec 2014 18:37:33 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 69846E0B45; Fri, 26 Dec 2014 18:37:33 +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 44AB8E0B47 for ; Fri, 26 Dec 2014 18:37:32 +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 7060434059A for ; Fri, 26 Dec 2014 18:37:31 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1949BD6DB for ; Fri, 26 Dec 2014 18:37:30 +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: <1419587204.c3a16fa68f5f85de440f5e8526800ac69090a4c9.dol-sen@gentoo> Subject: [gentoo-commits] proj/gentoo-keys:master commit in: gkeys/gkeys/ X-VCS-Repository: proj/gentoo-keys X-VCS-Files: gkeys/gkeys/base.py X-VCS-Directories: gkeys/gkeys/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: c3a16fa68f5f85de440f5e8526800ac69090a4c9 X-VCS-Branch: master Date: Fri, 26 Dec 2014 18:37:30 +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: 0c6b6291-162a-4b67-8ca5-c00a70496777 X-Archives-Hash: 04de4c73b6a79c3c22d40a2c6ccab6e2 commit: c3a16fa68f5f85de440f5e8526800ac69090a4c9 Author: Brian Dolbec gentoo org> AuthorDate: Fri Dec 26 09:46:44 2014 +0000 Commit: Brian Dolbec gmail com> CommitDate: Fri Dec 26 09:46:44 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/gentoo-keys.git;a=commit;h=c3a16fa6 gkeys/base.py: Add a justdoit option, fix boolean options --- gkeys/gkeys/base.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/gkeys/gkeys/base.py b/gkeys/gkeys/base.py index c37d536..201f31c 100644 --- a/gkeys/gkeys/base.py +++ b/gkeys/gkeys/base.py @@ -128,8 +128,8 @@ class CliBase(object): @staticmethod def _option_timestamp(parser=None): - parser.add_argument('-t', '--timestamp', dest='timestamp', type=bool, - default=False, + parser.add_argument('-t', '--timestamp', dest='timestamp', + action='store_true', default=False, help='Turn on timestamp use') @staticmethod @@ -139,9 +139,16 @@ class CliBase(object): @staticmethod def _option_status(parser=None): - parser.add_argument('-A', '--status', default=False, + parser.add_argument('-A', '--status', action='store_true', + default=False, help='The active status of the member') + @staticmethod + def _option_justdoit(parser=None): + parser.add_argument('--justdoit', dest='justdoit', + action='store_true', default=False, + help='Just Do It') + def parse_args(self, args): '''Parse a list of aruments