From 1448413c5c73247171a6b1f3d37065691d144598 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Sat, 18 Aug 2018 12:41:26 -0400 Subject: [PATCH] BaseTERule: Fix conditional_block property. In apol, unconditional TE rules were shown as having no conditional but as being in the False block. Since the _conditional_block attribute is bint, it will never be None. Use the _conditional attribute to determine if the rule is conditional. --- setools/policyrep/terule.pxi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setools/policyrep/terule.pxi b/setools/policyrep/terule.pxi index 1e1ddeb..9780d19 100644 --- a/setools/policyrep/terule.pxi +++ b/setools/policyrep/terule.pxi @@ -80,7 +80,7 @@ cdef class BaseTERule(PolicyRule): If the rule is here, this property is False } """ - if self._conditional_block is None: + if self._conditional is None: raise RuleNotConditional else: return self._conditional_block