From 379284c567125dd779515bfb708afe55bd29dfb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tibor=20=C5=A0imko?= Date: Wed, 13 Sep 2023 21:35:31 +0200 Subject: [PATCH] utils: clean JSON output when running update_fixtures_container_images --- utils/update_fixtures_container_images.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/utils/update_fixtures_container_images.py b/utils/update_fixtures_container_images.py index 29a06d277..679f325a2 100755 --- a/utils/update_fixtures_container_images.py +++ b/utils/update_fixtures_container_images.py @@ -111,6 +111,12 @@ def main(input_path, output_path): # noqa: D301,D412 print(p.stderr.decode()) os.rename(updated_dataset_path + ".NEW", updated_dataset_path) + # clean resulting JSON file + if os.path.exists("../opendata.cern.ch/scripts/clean_json_file.py"): + os.system( + f"../opendata.cern.ch/scripts/clean_json_file.py {updated_dataset_path}" + ) + # remove temporary directory shutil.rmtree(tmp_source_records_dir)