def check_server(host, port, ajax):
 if ((host.lower() == 'localhost') and sabnzbd.AMBI_LOCALHOST):
  return badParameterResponse(T('Warning: LOCALHOST is ambiguous, use numerical IP-address.'), ajax)
 if GetServerParms(host, int_conv(port)):
  return ''
 else:
  return badParameterResponse((T('Server address "%s:%s" is not valid.') % (host, port)), ajax)

def check_server ( host , port , ajax ) : if ( ( host . lower ( ) == 'localhost' ) and sabnzbd . AMBI_LOCALHOST ) : return badParameterResponse ( T ( 'Warning: LOCALHOST is ambiguous, use numerical IP-address.' ) , ajax ) if GetServerParms ( host , int_conv ( port ) ) : return '' else : return badParameterResponse ( ( T ( 'Server address "%s:%s" is not valid.' ) % ( host , port ) ) , ajax )
perform a request until the server reply .