Mercurial > repos > cathywise > truststore_browse
comparison TrustStoreGalaxyBrowse.py @ 20:91bad9ac39c6
This is giving me a headache.
author | Wise, Catherine (Digital, Acton) <Catherine.Wise@csiro.au> |
---|---|
date | Thu, 25 Jun 2015 13:11:57 +1000 |
parents | bae7471a4741 |
children | 4819fbb59766 |
comparison
equal
deleted
inserted
replaced
19:bae7471a4741 | 20:91bad9ac39c6 |
---|---|
196 name = construct_multi_filename(hda_id, filename, extension) | 196 name = construct_multi_filename(hda_id, filename, extension) |
197 target_output_filename = None | 197 target_output_filename = None |
198 data_type = "new_primary_dataset" | 198 data_type = "new_primary_dataset" |
199 target_output_filename = os.path.normpath(os.path.join(extra_files_path, name)) | 199 target_output_filename = os.path.normpath(os.path.join(extra_files_path, name)) |
200 download = truststore.getFile(store, location) | 200 download = truststore.getFile(store, location) |
201 primary = first | |
201 if download is None: | 202 if download is None: |
202 print("File %s not found." % location.name) | 203 print("File %s not found." % location.name) |
203 sys.exit(4) | 204 sys.exit(4) |
204 if first: | 205 if first: |
205 first = False | 206 first = False |
206 target_output_filename = download | 207 target_output_filename = file_name |
208 data_type = "dataset" | |
207 ungzip(download, target_output_filename) | 209 ungzip(download, target_output_filename) |
210 metadata_file.write( | |
211 metadata_to_json(dataset_id, target_output_filename, name, extension, data_type, primary=primary)) | |
208 # ext = sniff.handle_uploaded_dataset_file(target_output_filename, datatypes_registry, ext=ext) | 212 # ext = sniff.handle_uploaded_dataset_file(target_output_filename, datatypes_registry, ext=ext) |
209 # print("Guessed file type: " + ext) | 213 # print("Guessed file type: " + ext) |
210 print("in file: " + properties_file) | |
211 metadata_file.write( | |
212 metadata_to_json(dataset_id, target_output_filename, name, extension, data_type)) | |
213 else: | 214 else: |
214 print("Store is damaged or we don't have sufficient access.") | 215 print("Store is damaged or we don't have sufficient access.") |
215 sys.exit(4) | 216 sys.exit(4) |
216 | 217 |
217 | 218 |