INNER CODE UNIT · Python

unset_check_error

O-X-L/ansible-opnsense · plugins/module_utils/helper/main.py:88

def unset_check_error(params: dict, field: str, fail: bool) -> bool:
    """Validates that a required field is set; optionally exits the module on failure."""
    if is_unset(params[field]):
        if fail:
            exit_cnf(f"Field '{field}' must be set!")

        return False

    return True

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…