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

Changeset 4:157a5c9ea72a (2020-11-22)
Previous changeset 3:a2953ef09fe1 (2020-10-12) Next changeset 5:be70da9dc013 (2021-04-24)
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/data_managers/data_manager_primer_scheme_bedfiles commit 02d2967f77e3fa5a18aea63dc84aa9ab418dc165"
modified:
data_manager/install_primer_scheme_bedfiles.py
b
diff -r a2953ef09fe1 -r 157a5c9ea72a data_manager/install_primer_scheme_bedfiles.py
--- a/data_manager/install_primer_scheme_bedfiles.py Mon Oct 12 13:47:03 2020 +0000
+++ b/data_manager/install_primer_scheme_bedfiles.py Sun Nov 22 12:52:52 2020 +0000
[
@@ -135,7 +135,8 @@
         )
         exit(1)
 
-    config = json.load(open(args.galaxy_datamanager_filename))
+    with open(args.galaxy_datamanager_filename) as fh:
+        config = json.load(fh)
     output_directory = config.get("output_data", [{}])[0].get("extra_files_path", None)
     if output_directory is None:
         output_directory = args.output_directory
@@ -144,10 +145,7 @@
         os.makedirs(output_directory)
 
     data_manager_dict = {}
-    data_manager_dict["data_tables"] = json.load(
-        open(args.galaxy_datamanager_filename)
-    ).get("data_tables", {})
-    data_manager_dict["data_tables"] = data_manager_dict.get("data_tables", {})
+    data_manager_dict["data_tables"] = config.get("data_tables", {})
     data_manager_dict["data_tables"][DATA_TABLE_NAME] = data_manager_dict[
         "data_tables"
     ].get(DATA_TABLE_NAME, [])
@@ -163,5 +161,5 @@
         )
 
     data_manager_dict["data_tables"][DATA_TABLE_NAME].extend(data)
-    print(data_manager_dict)
-    json.dump(data_manager_dict, open(args.galaxy_datamanager_filename, "w"))
+    with open(args.galaxy_datamanager_filename, "w") as fh:
+        json.dump(data_manager_dict, fh, sort_keys=True)