def get_cli_env(options): env = Env() env.user, env.groups = utils.get_cib_user_groups() env.known_hosts_getter = utils.read_known_hosts_file # Debug messages always go to the processor. The parameter only affects if # they will be printed to stdout. We are not printing the messages. Instead # we get all the messages the processor got. So the value of the parameter # does not matter. env.report_processor = LibraryReportProcessor() env.request_timeout = (options.get("request_timeout") or settings.default_request_timeout) return env
def get_cli_env(options): env = Env() env.user, env.groups = utils.get_cib_user_groups() env.known_hosts_getter = utils.read_known_hosts_file # Debug messages always go to the processor. The parameter only affects if # they will be printed to stdout. We are not printing the messages. Instead # we get all the messages the processor got. So the value of the parameter # does not matter. env.report_processor = LibraryReportProcessor(True) env.request_timeout = ( options.get("request_timeout") or settings.default_request_timeout ) return env