1 new changeset in galaxy-central: http://bitbucket.org/galaxy/galaxy-central/changeset/c1aeb2f33b4a/ changeset: r5433:c1aeb2f33b4a user: greg date: 2011-04-19 16:20:01 summary: Improved exception handling in the tool shed. affected #: 2 files (89 bytes) --- a/lib/galaxy/webapps/community/controllers/upload.py Tue Apr 19 09:44:28 2011 -0400 +++ b/lib/galaxy/webapps/community/controllers/upload.py Tue Apr 19 10:20:01 2011 -0400 @@ -51,7 +51,7 @@ try: uploaded_file = urllib2.urlopen( url_paste ) except ( ValueError, urllib2.HTTPError ), e: - message = 'An error occurred trying to retrieve the URL entered on the upload form: %s' % e + message = 'An error occurred trying to retrieve the URL entered on the upload form: %s' % str( e ) status = 'error' except urllib2.URLError, e: message = 'An error occurred trying to retrieve the URL entered on the upload form: %s' % e.reason --- a/lib/galaxy/webapps/community/datatypes/__init__.py Tue Apr 19 09:44:28 2011 -0400 +++ b/lib/galaxy/webapps/community/datatypes/__init__.py Tue Apr 19 10:20:01 2011 -0400 @@ -65,8 +65,8 @@ # xml_files and tool_tags will only be received if we're called from the ToolSuite.verify() method. try: tar = tarfile.open( f.name ) - except tarfile.ReadError: - raise DatatypeVerificationError( 'The archive is not a readable tar file.' ) + except tarfile.ReadError, e: + raise DatatypeVerificationError( 'Error reading the archive, problem: %s' % str( e ) ) if not xml_files: # Make sure we're not uploading a tool suite if filter( lambda x: x.lower().find( 'suite_config.xml' ) >= 0, tar.getnames() ): @@ -78,9 +78,8 @@ try: tree = ElementTree.parse( tar.extractfile( xml_file ) ) root = tree.getroot() - except: - log.exception( 'fail:' ) - continue + except Exception, e: + raise DatatypeVerificationError( 'Error parsing file "%s", problem: %s' % ( str( xml_file ), str( e ) ) ) if root.tag == 'tool': if 'id' not in root.keys(): raise DatatypeVerificationError( "Tool xml file (%s) does not include the required 'id' attribute in the <tool> tag" % str( xml_file ) ) 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.