diff --git a/respodns/ui.py b/respodns/ui.py index 4398321..206a27a 100644 --- a/respodns/ui.py +++ b/respodns/ui.py @@ -19,11 +19,13 @@ def ui(program, args): desc = "enable pretty-printing progress to stderr" parser.add_argument("--progress", action="store_true", help=desc) + chkgrp = parser.add_mutually_exclusive_group() + desc = "enable all checks instead of only the most likely ones" - parser.add_argument("--all", action="store_true", help=desc) + chkgrp.add_argument("--all", action="store_true", help=desc) desc = "enable only the first check" - parser.add_argument("--first", action="store_true", help=desc) + chkgrp.add_argument("--first", action="store_true", help=desc) desc = "enable debugging verbosity" parser.add_argument("--debug", action="store_true", help=desc) @@ -31,9 +33,7 @@ def ui(program, args): a = parser.parse_args(args) checks = [] + chk.first - if a.first and a.all: - parser.error("--all and --first cannot be used together") - elif a.all: + if a.all: checks += chk.checks elif a.first: pass