=== modified file 'mandos-ctl' --- mandos-ctl 2019-03-06 22:56:24 +0000 +++ mandos-ctl 2019-03-07 19:15:13 +0000 @@ -505,26 +505,6 @@ MillisecondsValueArgumentMixIn): property = "ApprovalDuration" -def has_actions(options): - return any((options.enable, - options.disable, - options.bump_timeout, - options.start_checker, - options.stop_checker, - options.is_enabled, - options.remove, - options.checker is not None, - options.timeout is not None, - options.extended_timeout is not None, - options.interval is not None, - options.approved_by_default is not None, - options.approval_delay is not None, - options.approval_duration is not None, - options.host is not None, - options.secret is not None, - options.approve, - options.deny)) - def add_command_line_options(parser): parser.add_argument("--version", action="version", version="%(prog)s {}".format(version), @@ -671,6 +651,26 @@ options = parser.parse_args() + def has_actions(options): + return any((options.enable, + options.disable, + options.bump_timeout, + options.start_checker, + options.stop_checker, + options.is_enabled, + options.remove, + options.checker is not None, + options.timeout is not None, + options.extended_timeout is not None, + options.interval is not None, + options.approved_by_default is not None, + options.approval_delay is not None, + options.approval_duration is not None, + options.host is not None, + options.secret is not None, + options.approve, + options.deny)) + if has_actions(options) and not (options.client or options.all): parser.error("Options require clients names or --all.") if options.verbose and has_actions(options):