def _validate_filetype(filetype):
 if (filetype not in _SELINUX_FILETYPES.keys()):
  raise SaltInvocationError('Invalid filetype given: {0}'.format(filetype))
 return True

def _validate_filetype ( filetype ) : if ( filetype not in _SELINUX_FILETYPES . keys ( ) ) : raise SaltInvocationError ( 'Invalid filetype given: {0}' . format ( filetype ) ) return True
checks if the given filetype is a valid selinux filetype specification .