changeset 2:3ff3e9b8794f

Fix output json format.
author Catherine Wise <catherine.wise@csiro.au>
date Thu, 21 May 2015 14:21:03 +1000
parents a9127799070f
children 34bdad74ec64
files TrustStoreGalaxyBrowse.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/TrustStoreGalaxyBrowse.py	Thu May 21 12:56:14 2015 +1000
+++ b/TrustStoreGalaxyBrowse.py	Thu May 21 14:21:03 2015 +1000
@@ -176,13 +176,15 @@
                     extension = os.path.splitext(filename)[1]
                     name = construct_multi_filename(hda_id, filename, extension)
                     target_output_filename = None
+                    data_type = "dataset"
                     if first:
                         target_output_filename = file_name
+                        dataset = "new_primary_dataset"
                         first = False
                     else:
                         target_output_filename = os.path.normpath("/".join([extra_files_path, name]))
                     metadata_file.write(
-                        metadata_to_json(dataset_id, filename, name, extension, target_output_filename))
+                        metadata_to_json(dataset_id, target_output_filename, name, extension, data_type))
                     download = truststore.getFile(store, location)
                     if download is None:
                         print("File %s not found." % location.name)