def validate_rpc_host(ip):
 if ((not is_valid_ipv4(ip)) and (not is_valid_ipv6(ip))):
  raise ApplicationException(desc=('Invalid RPC ip address: %s' % ip))
 return ip

def validate_rpc_host ( ip ) : if ( ( not is_valid_ipv4 ( ip ) ) and ( not is_valid_ipv6 ( ip ) ) ) : raise ApplicationException ( desc = ( 'Invalid RPC ip address: %s' % ip ) ) return ip
validates the given ip for use as rpc server address .