1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/0026e8e49df4/ Changeset: 0026e8e49df4 User: greg Date: 2013-10-02 15:17:52 Summary: Handle errors when attempting to set metadata on a tool shed repository that contains a file with a .ga extension but turns out to not be a valid exported Galaxy workflow. Affected #: 1 file diff -r e416f8c710b63d7fc9f682539929e9823c26f041 -r 0026e8e49df4273dc9bebcf3475e1873e5e808f3 lib/tool_shed/util/metadata_util.py --- a/lib/tool_shed/util/metadata_util.py +++ b/lib/tool_shed/util/metadata_util.py @@ -710,8 +710,16 @@ fp = open( relative_path, 'rb' ) workflow_text = fp.read() fp.close() - exported_workflow_dict = json.from_json_string( workflow_text ) - if 'a_galaxy_workflow' in exported_workflow_dict and exported_workflow_dict[ 'a_galaxy_workflow' ] == 'true': + if workflow_text: + valid_exported_galaxy_workflow = True + try: + exported_workflow_dict = json.from_json_string( workflow_text ) + except Exception, e: + log.exception( "Skipping file %s since it does not seem to be a valid exported Galaxy workflow: %s" \ + % str( relative_path ), str( e ) ) + valid_exported_galaxy_workflow = False + if valid_exported_galaxy_workflow and \ + 'a_galaxy_workflow' in exported_workflow_dict and exported_workflow_dict[ 'a_galaxy_workflow' ] == 'true': metadata_dict = generate_workflow_metadata( relative_path, exported_workflow_dict, metadata_dict ) # Handle any data manager entries metadata_dict = generate_data_manager_metadata( app, Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.