Skip to content

Commit

Permalink
screenshots: Break out of loop early if screenshot refs are absent
Browse files Browse the repository at this point in the history
There is no point in extracting the screenshot ref and checking files
if the ref itself is absent

[release]
  • Loading branch information
bbhtt committed Oct 28, 2024
1 parent 8c8be32 commit 1836ee0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions flatpak_builder_lint/checks/screenshots.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ def check_repo(self, path: str) -> None:
for arch in arches:
if f"screenshots/{arch}" not in refs:
self.errors.add("appstream-screenshots-not-mirrored-in-ostree")
break

media_path = os.path.join(tmpdir, "app-info", f"screenshots-{arch}")
media_glob_path = f"{media_path}/**"
ostree.extract_subpath(path, f"screenshots/{arch}", "/", media_path)
Expand Down

0 comments on commit 1836ee0

Please sign in to comment.