INNER CODE UNIT · Python
_contract_path
WMAL/kodachios · Kodachi-OS-10-stable/open/dock/lib/kodachi_direct.py:108
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(
"the GTK direct-operation contract is not installed; refusing a "
"legacy shell fallback"
)