MCPcopy Create free account
hub / github.com/Luce-Org/lucebox-hub / require_path

Function require_path

server/scripts/test_prefill_cache.py:37–43  ·  view source on GitHub ↗
(path: Path, label: str, *, executable: bool = False)

Source from the content-addressed store, hash-verified

35
36
37def require_path(path: Path, label: str, *, executable: bool = False) -> None:
38 if not path.exists():
39 print(f"SKIP: {label} missing at {path}")
40 sys.exit(0)
41 if executable and not os.access(path, os.X_OK):
42 print(f"ERROR: {label} is not executable at {path}", file=sys.stderr)
43 sys.exit(1)
44
45
46def post_json(path: str, payload: dict, timeout: int = 900) -> dict:

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected