def get_host_name():
 hostname = get_address_override()
 if (not hostname):
  try:
   hostname = socket.gethostname()
  except:
   pass
  if ((not hostname) or (hostname == 'localhost') or hostname.startswith('127.')):
   hostname = get_local_address()
 return hostname

def get_host_name ( ) : hostname = get_address_override ( ) if ( not hostname ) : try : hostname = socket . gethostname ( ) except : pass if ( ( not hostname ) or ( hostname == 'localhost' ) or hostname . startswith ( '127.' ) ) : hostname = get_local_address ( ) return hostname
determine host-name for use in host-name-based addressing : - if ros_ip/ros_hostname is set .