mintro: write humman-readable JSON

Signed-off-by: Filipe Laíns <lains@riseup.net>
This commit is contained in:
Filipe Laíns 2024-05-29 14:17:55 +01:00 committed by Jussi Pakkanen
parent 8603bb4919
commit e5aed6ac8f
1 changed files with 1 additions and 1 deletions

View File

@ -592,7 +592,7 @@ def write_intro_info(intro_info: T.Sequence[T.Tuple[str, T.Union[dict, T.List[T.
out_file = os.path.join(info_dir, f'intro-{kind}.json')
tmp_file = os.path.join(info_dir, 'tmp_dump.json')
with open(tmp_file, 'w', encoding='utf-8') as fp:
json.dump(data, fp)
json.dump(data, fp, indent=2)
fp.flush() # Not sure if this is needed
os.replace(tmp_file, out_file)
updated_introspection_files.append(kind)