Skip to content

Commit 9ba2fd8

Browse files
committed
fix(balatrobench): extraction of the keys for used_vouchers
1 parent ee14a56 commit 9ba2fd8

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -251,3 +251,4 @@ benchmarks-old
251251
runs
252252
!tests/fixtures/runs/
253253
scripts
254+
runs-old

src/balatrobench/analyzer.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ def _read_used_vouchers(run_dir: Path) -> set[str]:
4242
last_line = line
4343

4444
data = json.loads(last_line)
45-
return set(data.get("used_vouchers", {}).keys())
45+
used_vouchers = data.get("used_vouchers", [])
46+
if isinstance(used_vouchers, dict):
47+
used_vouchers = list(used_vouchers.keys())
48+
return set(used_vouchers)
4649

4750

4851
class BenchmarkAnalyzer:

0 commit comments

Comments
 (0)