INNER CODE UNIT · Python

read_changes

witchan/ios-mcp · scripts/submit_bigboss_update.py:79

def read_changes(args: argparse.Namespace) -> str:
    if args.changes is not None:
        return args.changes
    return Path(args.changes_file).read_text(encoding="utf-8")


def validate_deb(path: str) -> Path:
    deb = Path(path)
    if not deb.is_file():
        raise FileNotFoundError(f"deb file not found: {deb}")
    if deb.suffix != ".deb":
        raise ValueError(f"expected a .deb file: {deb}")
    return deb


def guess_content_type(path: Path) -> str:
    if path.suffix == ".deb":
        return "application/vnd.debian.binary-package"

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…