galaxy-dist commit d3c41a755fa8: Missing tool data files are now a warning not a fatal error. This means that table can load but be empty, and the tool will also still load but have no options for the field that is connected to that data table. Is this too lenient?
# HG changeset patch -- Bitbucket.org # Project galaxy-dist # URL http://bitbucket.org/galaxy/galaxy-dist/overview # User James Taylor <james@jamestaylor.org> # Date 1280947283 14400 # Node ID d3c41a755fa85c68657c7525067531a2ce72fbb2 # Parent f6dbbf8922c840347975e0d725f6c45bc0f669a6 Missing tool data files are now a warning not a fatal error. This means that table can load but be empty, and the tool will also still load but have no options for the field that is connected to that data table. Is this too lenient? --- a/lib/galaxy/tools/data/__init__.py +++ b/lib/galaxy/tools/data/__init__.py @@ -36,7 +36,6 @@ class ToolDataTableManager( object ): table = tool_data_table_types[ type ]( table_elem ) self.data_tables[ table.name ] = table log.debug( "Loaded tool data table '%s", table.name ) - print >> sys.stderr, repr( self.data_tables ) class ToolDataTable( object ): def __init__( self, config_element ): @@ -72,9 +71,10 @@ class TabularToolDataTable( ToolDataTabl all_rows = [] for file_element in config_element.findall( 'file' ): filename = file_element.get( 'path' ) - assert os.path.exists( filename ), \ - "Cannot find index file '%s' for tool data table '%s'" % ( filename, self.name ) - all_rows.extend( self.parse_file_fields( open( filename ) ) ) + if not os.path.exists( filename ): + log.warn( "Cannot find index file '%s' for tool data table '%s'" % ( filename, self.name ) ) + else: + all_rows.extend( self.parse_file_fields( open( filename ) ) ) self.data = all_rows def get_fields( self ):
participants (1)
-
commits-noreply@bitbucket.org