diff --git a/flatpak_builder_lint/checks/flatmanager.py b/flatpak_builder_lint/checks/flatmanager.py index 45d153a5..9f9352c4 100644 --- a/flatpak_builder_lint/checks/flatmanager.py +++ b/flatpak_builder_lint/checks/flatmanager.py @@ -74,14 +74,14 @@ def check_repo(self, path: str) -> None: self.errors.add("flat-manager-branch-repo-mismatch") break - with ( - tempfile.TemporaryDirectory() as tmpdir, - gzip.open( - f"{path}/appstream/{arches.pop()}/appstream.xml.gz", "rb" - ) as appstream_gz, - open(f"{tmpdir}/appstream.xml", "wb") as appstream_file, - ): - shutil.copyfileobj(appstream_gz, appstream_file) + with tempfile.TemporaryDirectory() as tmpdir: + with ( + gzip.open( + f"{path}/appstream/{arches.pop()}/appstream.xml.gz", "rb" + ) as appstream_gz, + open(f"{tmpdir}/appstream.xml", "wb") as appstream_file, + ): + shutil.copyfileobj(appstream_gz, appstream_file) if not appstream.has_manifest_key(f"{tmpdir}/appstream.xml"): self.errors.add("appstream-no-flathub-manifest-key")