Mercurial > repos > iuc > data_manager_build_kma_index
changeset 2:2c532a6eee3f draft default tip
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_build_kma_index/ commit 02d2967f77e3fa5a18aea63dc84aa9ab418dc165"
author | iuc |
---|---|
date | Sun, 22 Nov 2020 12:45:39 +0000 (2020-11-22) |
parents | 8c2e674a93bb |
children | |
files | data_manager/kma_build_index.py |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/data_manager/kma_build_index.py Tue Apr 07 23:20:00 2020 -0400 +++ b/data_manager/kma_build_index.py Sun Nov 22 12:45:39 2020 +0000 @@ -47,8 +47,8 @@ def main(args): - - data_manager_input = json.loads(open(args.data_manager_json).read()) + with open(args.data_manager_json) as fh: + data_manager_input = json.load(fh) target_directory = data_manager_input['output_data'][0]['extra_files_path'] @@ -78,7 +78,8 @@ target_directory, ) - open(args.data_manager_json, 'w').write(json.dumps(data_manager_output)) + with open(args.data_manager_json, 'w') as fh: + json.dump(data_manager_output, fh, sort_keys=True) if __name__ == "__main__":