Skip to content

Commit 10b0e51

Browse files
committed
umu_runtime: update log statements
1 parent eb54bcd commit 10b0e51

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

umu/umu_runtime.py

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,7 @@ def _install_umu(
101101
CLIENT_SESSION.close()
102102
raise HTTPException(err)
103103

104-
log.console(
105-
f"Downloading latest steamrt {codename} (public beta),"
106-
"please wait..."
107-
)
104+
log.console(f"Downloading latest steamrt {codename}, please wait...")
108105
with tmp.joinpath(archive).open(mode="ab") as file:
109106
chunk_size: int = 64 * 1024 # 64 KB
110107
while True:
@@ -120,7 +117,7 @@ def _install_umu(
120117
CLIENT_SESSION.close()
121118
raise ValueError(err)
122119

123-
log.console(f"steamrt {codename}: SHA256 is OK")
120+
log.console(f"{archive}: SHA256 is OK")
124121
CLIENT_SESSION.close()
125122

126123
# Open the tar file and move the files
@@ -222,6 +219,7 @@ def _update_umu(
222219
log.console("Restoring Runtime Platform...")
223220
_install_umu(json, thread_pool)
224221
return
222+
225223
log.debug("Runtime: %s", runtime.name)
226224
log.debug("Codename: %s", codename)
227225

@@ -262,7 +260,6 @@ def _update_umu(
262260

263261
CLIENT_SESSION.request("GET", url)
264262
resp = CLIENT_SESSION.getresponse()
265-
log.debug("Restoring VERSIONS.txt")
266263

267264
# Handle the redirect
268265
if resp.status == 301:
@@ -301,7 +298,7 @@ def _update_umu(
301298
sha256(resp.read()).digest()
302299
!= sha256(local.joinpath("VERSIONS.txt").read_bytes()).digest()
303300
):
304-
log.console(f"Updating {codename} to latest...")
301+
log.console("Updating steamrt to latest...")
305302
_install_umu(json, thread_pool)
306303
log.debug("Removing: %s", runtime)
307304
rmtree(runtime.as_posix())
@@ -394,16 +391,16 @@ def check_runtime(src: Path, json: dict[str, Any]) -> int:
394391
[file for file in src.glob(f"{codename}*") if file.is_dir()]
395392
)
396393
except ValueError:
397-
log.warning("%s validation failed", codename)
394+
log.warning("steamrt validation failed")
398395
log.warning("Could not find runtime in '%s'", src)
399396
return ret
400397

401398
if not pv_verify.is_file():
402-
log.warning("%s validation failed", codename)
399+
log.warning("steamrt validation failed")
403400
log.warning("File does not exist: '%s'", pv_verify)
404401
return ret
405402

406-
log.console(f"Verifying integrity of steamrt {codename}...")
403+
log.console(f"Verifying integrity of {runtime.name}...")
407404
ret = run(
408405
[
409406
pv_verify.as_posix(),
@@ -415,9 +412,9 @@ def check_runtime(src: Path, json: dict[str, Any]) -> int:
415412
).returncode
416413

417414
if ret:
418-
log.warning("%s validation failed", codename)
415+
log.warning("steamrt validation failed")
419416
log.debug("%s exited with the status code: %s", pv_verify.name, ret)
420417
return ret
421-
log.console(f"steamrt {codename}: mtree is OK")
418+
log.console(f"{runtime.name}: mtree is OK")
422419

423420
return ret

0 commit comments

Comments
 (0)