diff data_manager/data_manager.py @ 1:1ff9996995ee draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_mitos commit 02d2967f77e3fa5a18aea63dc84aa9ab418dc165"
author iuc
date Sun, 22 Nov 2020 12:51:27 +0000
parents 26a6f95e82c8
children 19d9be08560c
line wrap: on
line diff
--- a/data_manager/data_manager.py	Fri Mar 27 17:50:23 2020 -0400
+++ b/data_manager/data_manager.py	Sun Nov 22 12:51:27 2020 +0000
@@ -71,14 +71,14 @@
     data_manager_entry['path'] = path
     data_manager_json = dict(data_tables=dict(mitos=data_manager_entry))
 
-    with open(outjson) as f:
-        params = json.loads(f.read())
+    with open(outjson) as fh:
+        params = json.load(fh)
     target_directory = params['output_data'][0]['extra_files_path']
     os.mkdir(target_directory)
     # output_path = os.path.abspath(os.path.join(os.getcwd(), 'mitos'))
     shutil.move(os.path.join(workdir, path), target_directory)
     with open(outjson, 'w') as fh:
-        fh.write(json.dumps(data_manager_json, sort_keys=True))
+        json.dump(data_manager_json, fh, sort_keys=True)
 
 
 if __name__ == '__main__':