Skip to content

Commit

Permalink
Revert "flatmanager: Use single with statement"
Browse files Browse the repository at this point in the history
This reverts commit 4860ce8.
  • Loading branch information
barthalion authored and bbhtt committed Oct 6, 2024
1 parent a53d0d8 commit d5644b3
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions flatpak_builder_lint/checks/flatmanager.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,12 @@ def check_repo(self, path: str) -> None:
self.errors.add("flat-manager-branch-repo-mismatch")
break

with (
tempfile.TemporaryDirectory() as tmpdir,
gzip.open(
with tempfile.TemporaryDirectory() as tmpdir:
with gzip.open( # noqa: SIM117
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)
) as appstream_gz:
with 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")
Expand Down

0 comments on commit d5644b3

Please sign in to comment.