Repository 'data_manager_build_bracken_database'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/data_manager_build_bracken_database

Changeset 2:fd5830f88314 (2020-11-22)
Previous changeset 1:9059edc96a85 (2020-01-19) Next changeset 3:3c7d2c84cb09 (2021-11-08)
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_build_bracken_database/ commit 02d2967f77e3fa5a18aea63dc84aa9ab418dc165"
modified:
data_manager/bracken_build_database.py
b
diff -r 9059edc96a85 -r fd5830f88314 data_manager/bracken_build_database.py
--- a/data_manager/bracken_build_database.py Sun Jan 19 04:33:53 2020 -0500
+++ b/data_manager/bracken_build_database.py Sun Nov 22 12:45:23 2020 +0000
[
@@ -55,7 +55,8 @@
     parser.add_argument('--database-name', dest='database_name', help='Database Name')
     args = parser.parse_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']
 
@@ -69,7 +70,7 @@
     try:
         os.mkdir(target_directory)
     except OSError as exc:
-        if exc.errno == errno.EEXIST and os.path.isdir( target_directory ):
+        if exc.errno == errno.EEXIST and os.path.isdir(target_directory):
             pass
         else:
             raise
@@ -82,8 +83,8 @@
         args.database_name,
     )
 
-    with open(args.data_manager_json, 'w') as out:
-        out.write(json.dumps(data_manager_output, sort_keys=True))
+    with open(args.data_manager_json, 'w') as fh:
+        json.dump(data_manager_output, fh, sort_keys=True)
 
 
 if __name__ == "__main__":