mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-06 01:53:56 -06:00
fix: read numbered master keys in the switch test
This commit is contained in:
1 parent
eccd0b0a28
commit
4f8fbdfabb
1 file changed
+5
-5
@@ -13,6 +13,7 @@ carries `unsourceable:` until its own bytes are held.
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
import sys
|
import sys
|
||||||
import unittest
|
import unittest
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
@@ -300,11 +301,10 @@ class SwitchKeysAreTheNewestSet(unittest.TestCase):
|
|||||||
]
|
]
|
||||||
|
|
||||||
def newest(path: Path) -> int:
|
def newest(path: Path) -> int:
|
||||||
keys = [
|
generations = re.findall(
|
||||||
line.split("=")[0].strip() for line in path.read_text(errors="replace").splitlines()
|
r"^master_key_([0-9a-f]{2})\s*=", path.read_text(errors="replace"), re.MULTILINE
|
||||||
if line.startswith("master_key_")
|
)
|
||||||
]
|
return max((int(g, 16) for g in generations), default=-1)
|
||||||
return max((int(k.rsplit("_", 1)[1], 16) for k in keys), default=-1)
|
|
||||||
|
|
||||||
best = max(newest(REPO_ROOT / p) for p in held)
|
best = max(newest(REPO_ROOT / p) for p in held)
|
||||||
for key in ("yuzu", "citron", "eden", "suyu", "ryujinx", "kenji-nx", "skyline"):
|
for key in ("yuzu", "citron", "eden", "suyu", "ryujinx", "kenji-nx", "skyline"):
|
||||||
|
|||||||
Reference in new issue
Block a user