Skip to content

Commit e054843

Browse files
author
KadenZhang3321
committed
obs_stability: fix ruff SIM105 in report.py
Signed-off-by: KadenZhang3321 <1075567213@gmail.com>
1 parent 5495ed9 commit e054843

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

  • .github/workflows/scripts/obs_stability

‎.github/workflows/scripts/obs_stability/report.py‎

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#!/usr/bin/env python3
22
"""Aggregate per-reader result JSONs into a markdown summary."""
33

4+
import contextlib
45
import glob
56
import json
67
import os
@@ -68,10 +69,8 @@ def main() -> int:
6869
for line in f:
6970
parts = line.split()
7071
if len(parts) == 6:
71-
try:
72+
with contextlib.suppress(ValueError):
7273
stats["curl"].append(float(parts[5]))
73-
except ValueError:
74-
pass
7574

7675
print("## OBS HK bucket access stability report")
7776
print()
@@ -93,8 +92,7 @@ def main() -> int:
9392
print("### Failed attempts")
9493
print()
9594
for item in failures[:80]:
96-
print(f"- reader `{item['reader']}` on `{item['runner']}` "
97-
f"attempt {item['attempt']}: {item['error']}")
95+
print(f"- reader `{item['reader']}` on `{item['runner']}` attempt {item['attempt']}: {item['error']}")
9896
print()
9997
if sha_mismatch:
10098
print(f"**sha256 mismatch in reader(s): {sha_mismatch}** — data corruption, investigate.")

0 commit comments

Comments
 (0)