def semanage_fcontext_exists(sefcontext, target, ftype):
 record = (target, option_to_file_type_str[ftype])
 records = sefcontext.get_all()
 try:
  return records[record]
 except KeyError:
  return None

def semanage_fcontext_exists ( sefcontext , target , ftype ) : record = ( target , option_to_file_type_str [ ftype ] ) records = sefcontext . get_all ( ) try : return records [ record ] except KeyError : return None
get the selinux file context mapping definition from policy .