a qéqe5ã@shddlZddlZddlmZddlmZmZddlmZm Z ddl m Z ddl m Z Gdd „d e ƒZdS) éN)ÚIterableé)ÚCriteriaDescriptorÚCriteriaSetDescriptor)ÚBoundsÚBoundsRuletype)Ú PolicyQuery)Ú match_regexcsleZdZUdZeed�ZedƒZdZ e e d<edƒZ dZ e e d<ddœ‡fdd „ Zeedœd d „Z‡ZS) Ú BoundsQueryzµ Query *bounds statements. Parameter: policy The policy to query. Keyword Parameters/Class attributes: ruletype The rule type(s) to match. )Ú enum_classÚ parent_regexFÚ child_regexN)Úreturnc s(tt|ƒj|fi|¤Žt t¡|_dS)N)Úsuperr Ú__init__ÚloggingZ getLoggerÚ__name__Úlog)ÚselfÚpolicyÚkwargs©Ú __class__©ú9/usr/lib64/python3.9/site-packages/setools/boundsquery.pyr!szBoundsQuery.__init__ccsª|j d |¡¡|j d |¡¡|j d |¡¡|j d |¡¡|j ¡D]R}|jrj|j|jvrjqR|jr„t|j|j|j ƒs„qR|j ržt|j |j |j ƒsžqR|VqRdS)z7Generator which yields all matching *bounds statements.z)Generating bounds results from {0.policy}zRuletypes: {0.ruletype}z-Parent: {0.parent!r}, regex: {0.parent_regex}z*Child: {0.child!r}, regex: {0.child_regex}N) rÚinfoÚformatÚdebugrZboundsÚruletypeÚparentr r Úchildr )rÚbrrrÚresults%s(ýýzBoundsQuery.results)rÚ __module__Ú __qualname__Ú__doc__rrrrrr ÚboolÚ__annotations__r r rrrr"Ú __classcell__rrrrr s    r )rÚreÚtypingrZ descriptorsrrZ policyreprrÚqueryrÚutilr r rrrrÚs