From 394ed2d7116fd0603c5712a8fe962777e17b072e Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Thu, 7 Nov 2024 22:17:14 +0100 Subject: [PATCH] more colors --- client/pyscripts/fm11rf08_full.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/client/pyscripts/fm11rf08_full.py b/client/pyscripts/fm11rf08_full.py index ffa20c549..e4192ad82 100644 --- a/client/pyscripts/fm11rf08_full.py +++ b/client/pyscripts/fm11rf08_full.py @@ -525,7 +525,7 @@ globals: bad = 0 for n in blkn_todo: cmd = f"hf mf rdbl -c 4 --key {bdkey} --blk {n}" - lprint(f"`{cmd}`", flush=True, log=False) + lprint(f" `{cmd}`", flush=True, log=False, end='') for retry in range(5): p.console(cmd) @@ -539,11 +539,19 @@ globals: if found: break + s = color("ok", fg="green") if not found: data.append(f"{n:3d} | -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- | ----------------") bad += 1 + s = color("fail", fg="red") + + lprint(" " * (3 - len(str(n))), flush='', log=False, end='', prompt='') + lprint(f' ( {s} )', flush='', log=False, prompt='') s = color("ok", fg="green") + if bad > 0: + s = color("fail", fg="red") + lprint(f'Loading ( {s} )', log=False) return data, blkn