Skip to content

Commit

Permalink
umu_proton: update format
Browse files Browse the repository at this point in the history
  • Loading branch information
R1kaB3rN committed Jun 2, 2024
1 parent 9c9bfd4 commit 1ff9b1b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions umu/umu_proton.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ def get_umu_proton(
# No internet and compat tool is empty, just return and raise an
# exception from the caller
environ["PROTONPATH"] = ""

return env


Expand All @@ -78,6 +79,7 @@ def _fetch_releases() -> list[tuple[str, str]]:
) as resp:
if resp.status != 200:
return files

for release in loads(resp.read().decode("utf-8")):
if not release.get("assets"):
continue
Expand Down Expand Up @@ -319,7 +321,6 @@ def _get_latest(
if file.name.startswith(("UMU-Proton", "ULWGL-Proton"))
]
tar_path: Path = tmp.joinpath(tarball)

# Ideally, an in-place differential update would be
# performed instead for this job but this will do for now
log.debug("Extracting %s -> %s", tar_path, steam_compat)
Expand All @@ -343,15 +344,13 @@ def _get_latest(
except ValueError:
log.exception("ValueError")
tarball: str = files[1][0]

# Digest mismatched
# Since we do not want the user to use a suspect file, delete it
tmp.joinpath(tarball).unlink(missing_ok=True)
return None
except KeyboardInterrupt:
tarball: str = files[1][0]
proton_dir: str = tarball[: tarball.find(".tar.gz")] # Proton dir

# Exit cleanly
# Clean up extracted data and cache to prevent corruption/errors
_cleanup(tarball, proton_dir, tmp, steam_compat)
Expand Down

0 comments on commit 1ff9b1b

Please sign in to comment.