
­­­­­­­­­­­­­­­­­­
<!DOCTYPE html>
<html>
3
^                 @   s6   d dl Z ddlmZ ddlmZ G dd deeZdS )    N   )	MatchName)PolicyQueryc                   s(   e Zd ZdZ fddZdd Z  ZS )PolCapQuerya/  
    Query SELinux policy capabilities

    Parameter:
    policy      The policy to query.

    Keyword Parameters/Class attributes:
    name        The name of the policy capability to match.
    name_regex  If true, regular expression matching will
                be used for matching the name.
    c                s$   t t| j|f| tjt| _d S )N)superr   __init__loggingZ	getLogger__name__log)selfpolicykwargs)	__class__ #/usr/lib64/python3.6/polcapquery.pyr   '   s    zPolCapQuery.__init__c             c   sH   | j jdj|  | j| j  x$| jj D ]}| j|s:q*|V  q*W dS )z8Generator which yields all matching policy capabilities.z4Generating policy capability results from {0.policy}N)r
   infoformatZ_match_name_debugr   ZpolcapsZ_match_name)r   Zcapr   r   r   results+   s    
zPolCapQuery.results)r	   
__module____qualname____doc__r   r   __classcell__r   r   )r   r   r      s   r   )r   Zmixinsr   Zqueryr   r   r   r   r   r   <module>   s   