def get_auth_handler(host, config, provider, requested_capability=None):
 ready_handlers = []
 auth_handlers = boto.plugin.get_plugin(AuthHandler, requested_capability)
 for handler in auth_handlers:
  try:
   ready_handlers.append(handler(host, config, provider))
  except boto.auth_handler.NotReadyToAuthenticate:
   pass
 if (not ready_handlers):
  checked_handlers = auth_handlers
  names = [handler.__name__ for handler in checked_handlers]
  raise boto.exception.NoAuthHandlerFound(('No handler was ready to authenticate. %d handlers were checked. %s Check your credentials' % (len(names), str(names))))
 return ready_handlers[(-1)]

def get_auth_handler ( host , config , provider , requested_capability = None ) : ready_handlers = [ ] auth_handlers = boto . plugin . get_plugin ( AuthHandler , requested_capability ) for handler in auth_handlers : try : ready_handlers . append ( handler ( host , config , provider ) ) except boto . auth_handler . NotReadyToAuthenticate : pass if ( not ready_handlers ) : checked_handlers = auth_handlers names = [ handler . __name__ for handler in checked_handlers ] raise boto . exception . NoAuthHandlerFound ( ( 'No handler was ready to authenticate. %d handlers were checked. %s Check your credentials' % ( len ( names ) , str ( names ) ) ) ) return ready_handlers [ ( - 1 ) ]
finds an authhandler that is ready to authenticate .