mirror of
https://github.com/trezor/trezor-firmware.git
synced 2024-11-18 05:28:40 +00:00
chore(python): include error when wanting to upload a JSON file as a translation payload
[no changelog]
This commit is contained in:
parent
a8beb03428
commit
8d1e002dfb
@ -224,6 +224,11 @@ def language(
|
||||
language_data = b""
|
||||
else:
|
||||
assert path_or_url is not None
|
||||
if path_or_url.endswith(".json"):
|
||||
raise click.ClickException(
|
||||
"Provided file is a JSON file, not a blob file.\n"
|
||||
"Generate blobs by running `python core/translations/cli.py gen` in root."
|
||||
)
|
||||
try:
|
||||
language_data = Path(path_or_url).read_bytes()
|
||||
except Exception:
|
||||
|
Loading…
Reference in New Issue
Block a user