def handle_missing_index_file(app, tool_path, sample_files, repository_tools_tups, sample_files_copied):
 for (index, repository_tools_tup) in enumerate(repository_tools_tups):
  (tup_path, guid, repository_tool) = repository_tools_tup
  params_with_missing_index_file = repository_tool.params_with_missing_index_file
  for param in params_with_missing_index_file:
   options = param.options
   missing_file_name = basic_util.strip_path(options.missing_index_file)
   if (missing_file_name not in sample_files_copied):
    for sample_file in sample_files:
     sample_file_name = basic_util.strip_path(sample_file)
     if (sample_file_name == ('%s.sample' % missing_file_name)):
      copy_sample_file(app, sample_file)
      if (options.tool_data_table and options.tool_data_table.missing_index_file):
       options.tool_data_table.handle_found_index_file(options.missing_index_file)
      sample_files_copied.append(options.missing_index_file)
      break
  repository_tool = app.toolbox.load_tool(os.path.join(tool_path, tup_path), guid=guid, use_cached=False)
  repository_tools_tups[index] = (tup_path, guid, repository_tool)
 return (repository_tools_tups, sample_files_copied)

def handle_missing_index_file ( app , tool_path , sample_files , repository_tools_tups , sample_files_copied ) : for ( index , repository_tools_tup ) in enumerate ( repository_tools_tups ) : ( tup_path , guid , repository_tool ) = repository_tools_tup params_with_missing_index_file = repository_tool . params_with_missing_index_file for param in params_with_missing_index_file : options = param . options missing_file_name = basic_util . strip_path ( options . missing_index_file ) if ( missing_file_name not in sample_files_copied ) : for sample_file in sample_files : sample_file_name = basic_util . strip_path ( sample_file ) if ( sample_file_name == ( '%s.sample' % missing_file_name ) ) : copy_sample_file ( app , sample_file ) if ( options . tool_data_table and options . tool_data_table . missing_index_file ) : options . tool_data_table . handle_found_index_file ( options . missing_index_file ) sample_files_copied . append ( options . missing_index_file ) break repository_tool = app . toolbox . load_tool ( os . path . join ( tool_path , tup_path ) , guid = guid , use_cached = False ) repository_tools_tups [ index ] = ( tup_path , guid , repository_tool ) return ( repository_tools_tups , sample_files_copied )
inspect each tool to see if it has any input parameters that are dynamically generated select lists that depend on a .