def find_repository_host(job_path):
 site_repo_info = site_find_repository_host(job_path)
 if (site_repo_info is not None):
  return site_repo_info
 results_repos = [RESULTS_HOST]
 for drone in DRONES.split(','):
  drone = drone.strip()
  if (drone not in results_repos):
   results_repos.append(drone)
 if (ARCHIVE_HOST and (ARCHIVE_HOST not in results_repos)):
  results_repos.append(ARCHIVE_HOST)
 for drone in results_repos:
  if (drone == 'localhost'):
   continue
  http_path = ('http://%s%s' % (drone, job_path))
  try:
   logging.info('Attempting to access the selected results URL: "%s"', http_path)
   utils.urlopen(http_path)
   return ('http', utils.normalize_hostname(drone), job_path)
  except urllib2.URLError:
   logging.error('Failed to access the selected results URL. Reverting to usual results location')
   pass

def find_repository_host ( job_path ) : site_repo_info = site_find_repository_host ( job_path ) if ( site_repo_info is not None ) : return site_repo_info results_repos = [ RESULTS_HOST ] for drone in DRONES . split ( ',' ) : drone = drone . strip ( ) if ( drone not in results_repos ) : results_repos . append ( drone ) if ( ARCHIVE_HOST and ( ARCHIVE_HOST not in results_repos ) ) : results_repos . append ( ARCHIVE_HOST ) for drone in results_repos : if ( drone == 'localhost' ) : continue http_path = ( 'http://%s%s' % ( drone , job_path ) ) try : logging . info ( 'Attempting to access the selected results URL: "%s"' , http_path ) utils . urlopen ( http_path ) return ( 'http' , utils . normalize_hostname ( drone ) , job_path ) except urllib2 . URLError : logging . error ( 'Failed to access the selected results URL. Reverting to usual results location' ) pass
find the machine holding the given logs and return a url to the logs .