diff TrustStoreGalaxyBrowse.py @ 38:eb08580b547a

Fix output json format.
author Catherine Wise <catherine.wise@csiro.au>
date Thu, 21 May 2015 14:20:56 +1000
parents d25b82c3276f
children 624d8102cb75
line wrap: on
line diff
--- a/TrustStoreGalaxyBrowse.py	Thu May 21 12:54:42 2015 +1000
+++ b/TrustStoreGalaxyBrowse.py	Thu May 21 14:20:56 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)