Function
require_path
(path: Path, label: str, *, executable: bool = False)
Source from the content-addressed store, hash-verified
| 35 | |
| 36 | |
| 37 | def 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 | |
| 46 | def post_json(path: str, payload: dict, timeout: int = 900) -> dict: |
Tested by
no test coverage detected