commit: c3a16fa68f5f85de440f5e8526800ac69090a4c9 Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org> AuthorDate: Fri Dec 26 09:46:44 2014 +0000 Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> 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