1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-11-21 23:18:13 +00:00

fixup! feat(tests): simplify asserts on translated strings

This commit is contained in:
matejcik 2024-11-21 11:05:37 +01:00
parent eb6ed9b969
commit 0bee780daa

View File

@ -129,4 +129,7 @@ def regexp(key: str) -> re.Pattern:
def __getattr__(key: str) -> str:
return translate(key, _stacklevel=1)
try:
return translate(key, _stacklevel=1)
except KeyError as e:
raise AttributeError(f"Translation key '{key}' not found") from e