commit/galaxy-central: greg: More fixes for setting tool shed repsoitory metadata.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/changeset/47bcf28a53e9/ changeset: 47bcf28a53e9 user: greg date: 2012-04-21 03:45:30 summary: More fixes for setting tool shed repsoitory metadata. affected #: 3 files diff -r 49195c2f37cedabd034984b08058b163302286f0 -r 47bcf28a53e982e5c3062218f0eb8a9d24c6cbd6 lib/galaxy/util/shed_util.py --- a/lib/galaxy/util/shed_util.py +++ b/lib/galaxy/util/shed_util.py @@ -411,10 +411,15 @@ full_path = os.path.abspath( os.path.join( root, name ) ) if not ( check_binary( full_path ) or check_image( full_path ) or check_gzip( full_path )[ 0 ] or check_bz2( full_path )[ 0 ] or check_zip( full_path ) ): - # Make sure we're looking at a tool config and not a display application config or something else. - element_tree = util.parse_xml( full_path ) - element_tree_root = element_tree.getroot() - if element_tree_root.tag == 'tool': + try: + # Make sure we're looking at a tool config and not a display application config or something else. + element_tree = util.parse_xml( full_path ) + element_tree_root = element_tree.getroot() + is_tool = element_tree_root.tag == 'tool' + except Exception, e: + log.debug( "Error parsing %s, exception: %s" % ( full_path, str( e ) ) ) + is_tool = False + if is_tool: try: tool = toolbox.load_tool( full_path ) except Exception, e: diff -r 49195c2f37cedabd034984b08058b163302286f0 -r 47bcf28a53e982e5c3062218f0eb8a9d24c6cbd6 lib/galaxy/webapps/community/controllers/common.py --- a/lib/galaxy/webapps/community/controllers/common.py +++ b/lib/galaxy/webapps/community/controllers/common.py @@ -323,10 +323,15 @@ full_path = os.path.abspath( os.path.join( root, name ) ) if not ( check_binary( full_path ) or check_image( full_path ) or check_gzip( full_path )[ 0 ] or check_bz2( full_path )[ 0 ] or check_zip( full_path ) ): - # Make sure we're looking at a tool config and not a display application config or something else. - element_tree = util.parse_xml( full_path ) - element_tree_root = element_tree.getroot() - if element_tree_root.tag == 'tool': + try: + # Make sure we're looking at a tool config and not a display application config or something else. + element_tree = util.parse_xml( full_path ) + element_tree_root = element_tree.getroot() + is_tool = element_tree_root.tag == 'tool' + except Exception, e: + log.debug( "Error parsing %s, exception: %s" % ( full_path, str( e ) ) ) + is_tool = False + if is_tool: try: tool = load_tool( trans, full_path ) valid = True diff -r 49195c2f37cedabd034984b08058b163302286f0 -r 47bcf28a53e982e5c3062218f0eb8a9d24c6cbd6 lib/galaxy/webapps/community/controllers/repository.py --- a/lib/galaxy/webapps/community/controllers/repository.py +++ b/lib/galaxy/webapps/community/controllers/repository.py @@ -924,7 +924,8 @@ element_tree = util.parse_xml( tmp_filename ) element_tree_root = element_tree.getroot() is_tool = element_tree_root.tag == 'tool' - except: + except Exception, e: + log.debug( "Error parsing %s, exception: %s" % ( tmp_filename, str( e ) ) ) is_tool = False if is_tool: try: 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.
participants (1)
-
Bitbucket