changeset 11:9ada74e8915e

Try again.
author Wise, Catherine (Digital, Acton) <Catherine.Wise@csiro.au>
date Thu, 25 Jun 2015 08:41:33 +1000
parents 7301c2e96fce
children 0c3f64e3c8ff
files TrustStoreGalaxyBrowse.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/TrustStoreGalaxyBrowse.py	Thu Jun 25 08:36:38 2015 +1000
+++ b/TrustStoreGalaxyBrowse.py	Thu Jun 25 08:41:33 2015 +1000
@@ -193,14 +193,14 @@
                         first = False
                     else:
                         target_output_filename = os.path.normpath(os.path.join(extra_files_path, name))
-                    ext = sniff.handle_uploaded_dataset_file(filename, datatypes_registry, ext=ext)
-                    metadata_file.write(
-                        metadata_to_json(dataset_id, target_output_filename, name, ext, data_type))
                     download = truststore.getFile(store, location)
                     if download is None:
                         print("File %s not found." % location.name)
                         sys.exit(4)
                     ungzip(download, target_output_filename)
+                    ext = sniff.handle_uploaded_dataset_file(target_output_filename, datatypes_registry, ext=ext)
+                    metadata_file.write(
+                        metadata_to_json(dataset_id, target_output_filename, name, ext, data_type))
     else:
         print("Store is damaged or we don't have sufficient access.")
         sys.exit(4)