MCPcopy Create free account
hub / github.com/OpenIPC/firmware / find_image

Function find_image

general/scripts/size_report.py:76–82  ·  view source on GitHub ↗

REPACK_FIRMWARE renames foo -> foo. . Accept either form.

(images_dir: Path, base: str, soc_model: str)

Source from the content-addressed store, hash-verified

74
75
76def find_image(images_dir: Path, base: str, soc_model: str) -> Path | None:
77 """REPACK_FIRMWARE renames foo -> foo.<soc_model>. Accept either form."""
78 for name in (base, f"{base}.{soc_model}"):
79 p = images_dir / name
80 if p.exists():
81 return p
82 return None
83
84
85def parse_packages_file_list(path: Path) -> dict[str, str]:

Callers 1

build_reportFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected