INNER CODE UNIT · Python

DirectContractError

WMAL/kodachios · Kodachi-OS-10-stable/open/dock/lib/kodachi_direct.py:104

class DirectContractError(RuntimeError):
    """The generated direct-operation contract is absent or unsafe."""


def _contract_path():
    path = CONTRACT_PATH
    if path.is_file():
        try:
            stat = path.stat()
        except OSError as exc:
            raise DirectContractError(
                f"the GTK direct-operation contract cannot be inspected: {exc}") from exc
        if path.is_symlink() or stat.st_uid != 0 or stat.st_mode & 0o022:
            raise DirectContractError(
                "the GTK direct-operation contract is not a root-owned, "
                "non-writable regular file")
        return path
    raise DirectContractError(

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…