Skip to content

Commit 1ef0e6d

Browse files
committed
Replaced file content size check w/ data.json.is_valid() call
1 parent 330376f commit 1ef0e6d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • translate-messages/src/translate_messages/lib

translate-messages/src/translate_messages/lib/language.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def write_translations(cli):
5858

5959
lang_dir_path = cli.locales_path / lang_dir
6060
msgs_path = lang_dir_path / cli.msgs_filename
61-
if msgs_path.exists() and msgs_path.stat().st_size > 0:
61+
if msgs_path.exists() and data.json.is_valid(msgs_path):
6262
msgs = data.json.read(msgs_path)
6363
else:
6464
msgs = {}

0 commit comments

Comments
 (0)