comparison TrustStoreGalaxyBrowse.py @ 31:e4c13ce69e25

More helpful output.
author Catherine Wise <catherine.wise@csiro.au>
date Mon, 18 May 2015 12:07:05 +1000
parents 157062f5c547
children 20c1d4fa4084
comparison
equal deleted inserted replaced
30:0a6dd98baf53 31:e4c13ce69e25
107 json_params = None 107 json_params = None
108 metadata_path = None 108 metadata_path = None
109 all_params = None 109 all_params = None
110 with open(properties_file, 'r') as file_: 110 with open(properties_file, 'r') as file_:
111 settings = file_.read() 111 settings = file_.read()
112 print(settings)
113 all_params = json.loads(settings) 112 all_params = json.loads(settings)
114 json_params = all_params.get("param_dict") 113 json_params = all_params.get("param_dict")
115 metadata_path = all_params["job_config"]["TOOL_PROVIDED_JOB_METADATA_FILE"] 114 metadata_path = all_params["job_config"]["TOOL_PROVIDED_JOB_METADATA_FILE"]
116 115
117 output_filename = json_params.get('output', None) 116 output_filename = json_params.get('output', None)
164 if root is not None: 163 if root is not None:
165 with open(metadata_path, 'wb') as metadata_file: 164 with open(metadata_path, 'wb') as metadata_file:
166 for path in paths: 165 for path in paths:
167 locations = utils.Navigation.files_at_path(root, path) 166 locations = utils.Navigation.files_at_path(root, path)
168 for location in locations: 167 for location in locations:
169 if not locations: 168 if not location:
170 print("Path not found: " + path) 169 print("Path not found: " + path)
171 continue 170 continue
171 else:
172 print("Downloading file... " + location.name)
172 filename = "".join(c in SAFE_CHARS and c or '-' for c in location.name) 173 filename = "".join(c in SAFE_CHARS and c or '-' for c in location.name)
173 extension = os.path.splitext(filename)[1] 174 extension = os.path.splitext(filename)[1]
174 name = construct_multi_filename(hda_id, filename, extension) 175 name = construct_multi_filename(hda_id, filename, extension)
175 target_output_filename = None 176 target_output_filename = None
176 if first: 177 if first: