Sindbad~EG File Manager
3
�^� � @ sB d dl Z ddlmZ ddlmZ ddlmZ G dd� dee�ZdS )� N� )�CriteriaDescriptor)� MatchName)�PolicyQueryc sF e Zd ZdZdZedd� �Zejdd� �Z� fdd�Zdd � Z � Z
S )
� BoolQuerya� Query SELinux policy Booleans.
Parameter:
policy The policy to query.
Keyword Parameters/Class attributes:
name The Boolean name to match.
name_regex If true, regular expression matching
will be used on the Boolean name.
default The default state to match. If this
is None, the default state not be matched.
Nc C s | j S )N)�_default)�self� r �!/usr/lib64/python3.6/boolquery.py�default+ s zBoolQuery.defaultc C s |d krd | _ n
t|�| _ d S )N)r �bool)r �valuer r r
r / s c s$ t t| �j|f|� tjt�| _d S )N)�superr �__init__�loggingZ getLogger�__name__�log)r �policy�kwargs)� __class__r r
r 6 s zBoolQuery.__init__c c sr | j jdj| �� | j| j � | j jdj| �� x<| jj� D ].}| j|�sLq<| jdk rd|j | jkrdq<|V q<W dS )z:Generator which yields all Booleans matching the criteria.z*Generating Boolean results from {0.policy}zDefault: {0.default}N)
r �info�formatZ_match_name_debug�debugr ZboolsZ_match_namer �state)r Zbooleanr r r
�results: s
zBoolQuery.results)r �
__module__�__qualname__�__doc__r �propertyr �setterr r �
__classcell__r r )r r
r s
r )r Zdescriptorsr Zmixinsr Zqueryr r r r r r
�<module> s
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists