def create_context_and_executor(out, err, args): arg_parser = create_command_argument_parser(__file__) log = create_logger(True) options = arg_parser.parse_args(args) context = CommandContext(options.command, options.__dict__, out, err) hosts = check_hosts(options.__dict__, log, arg_parser.format_usage) return context, CommandExecutor(context, log, hosts)
def check_hosts(self): return check_hosts(self.options.__dict__, self.log, self.arg_parser.format_usage)