def load_check_from_places(check_config, check_name, checks_places, agentConfig):
 (load_success, load_failure) = ({}, {})
 for check_path_builder in checks_places:
  check_path = check_path_builder(check_name)
  if (not os.path.exists(check_path)):
   continue
  (check_is_valid, check_class, load_failure) = get_valid_check_class(check_name, check_path)
  if (not check_is_valid):
   continue
  (load_success, load_failure) = _initialize_check(check_config, check_name, check_class, agentConfig)
  _update_python_path(check_config)
  log.debug(('Loaded %s' % check_path))
  break
 return (load_success, load_failure)

def load_check_from_places ( check_config , check_name , checks_places , agentConfig ) : ( load_success , load_failure ) = ( { } , { } ) for check_path_builder in checks_places : check_path = check_path_builder ( check_name ) if ( not os . path . exists ( check_path ) ) : continue ( check_is_valid , check_class , load_failure ) = get_valid_check_class ( check_name , check_path ) if ( not check_is_valid ) : continue ( load_success , load_failure ) = _initialize_check ( check_config , check_name , check_class , agentConfig ) _update_python_path ( check_config ) log . debug ( ( 'Loaded %s' % check_path ) ) break return ( load_success , load_failure )
find a check named check_name in the given checks_places and try to initialize it with the given check_config .