proton: Use more meaningful variable names.

This commit is contained in:
Arkadiusz Hiler 2024-07-26 13:46:35 +03:00
parent 73c8213f1b
commit b2508139c2

14
proton
View File

@ -269,9 +269,9 @@ def try_get_game_library_dir():
#find library path which is a subset of the game path #find library path which is a subset of the game path
library_paths = g_session.env["STEAM_COMPAT_LIBRARY_PATHS"].split(":") library_paths = g_session.env["STEAM_COMPAT_LIBRARY_PATHS"].split(":")
for l in library_paths: for path in library_paths:
if l in g_session.env["STEAM_COMPAT_INSTALL_PATH"]: if path in g_session.env["STEAM_COMPAT_INSTALL_PATH"]:
return l return path
return None return None
@ -1289,10 +1289,10 @@ class Session:
try: try:
if "PRESSURE_VESSEL_RUNTIME_BASE" in self.env: if "PRESSURE_VESSEL_RUNTIME_BASE" in self.env:
with open(self.env["PRESSURE_VESSEL_RUNTIME_BASE"] + "/VERSIONS.txt", "r") as f: with open(self.env["PRESSURE_VESSEL_RUNTIME_BASE"] + "/VERSIONS.txt", "r") as f:
for l in f: for line in f:
l = l.strip() line = line.strip()
if len(l) > 0 and not l.startswith("#"): if len(line) > 0 and not line.startswith("#"):
cleaned = l.split("#")[0].strip().replace("\t", " ") cleaned = line.split("#")[0].strip().replace("\t", " ")
split = cleaned.split(" ", maxsplit=1) split = cleaned.split(" ", maxsplit=1)
self.log_file.write(split[0] + ": " + split[1] + "\n") self.log_file.write(split[0] + ": " + split[1] + "\n")
except (OSError, IOError, TypeError, KeyError): except (OSError, IOError, TypeError, KeyError):