def semanage_port_get_type(seport, port, proto):
 ports = port.split('-', 1)
 if (len(ports) == 1):
  ports.extend(ports)
 key = (int(ports[0]), int(ports[1]), proto)
 records = seport.get_all()
 if (key in records):
  return records[key]
 else:
  return None

def semanage_port_get_type ( seport , port , proto ) : ports = port . split ( '-' , 1 ) if ( len ( ports ) == 1 ) : ports . extend ( ports ) key = ( int ( ports [ 0 ] ) , int ( ports [ 1 ] ) , proto ) records = seport . get_all ( ) if ( key in records ) : return records [ key ] else : return None
get the selinux type of the specified port .