diff options
author | 2014-12-26 01:46:44 -0800 | |
---|---|---|
committer | 2014-12-26 01:46:44 -0800 | |
commit | c3a16fa68f5f85de440f5e8526800ac69090a4c9 (patch) | |
tree | 3e59a631dbee4ca3c7ea0aa362fc2af924c9a1e4 /gkeys | |
parent | gkeys: Separate and sort the avaialbe actions into groups (diff) | |
download | gentoo-keys-c3a16fa68f5f85de440f5e8526800ac69090a4c9.tar.gz gentoo-keys-c3a16fa68f5f85de440f5e8526800ac69090a4c9.tar.bz2 gentoo-keys-c3a16fa68f5f85de440f5e8526800ac69090a4c9.zip |
gkeys/base.py: Add a justdoit option, fix boolean options
Diffstat (limited to 'gkeys')
-rw-r--r-- | gkeys/gkeys/base.py | 13 |
1 files 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 |