diff --git a/setools/boolquery.py b/setools/boolquery.py index e917648..9bf4971 100644 --- a/setools/boolquery.py +++ b/setools/boolquery.py @@ -53,7 +53,7 @@ class BoolQuery(compquery.ComponentQuery): if self.name and not self._match_name(boolean): continue - if self.match_default and boolean.state() != self.default: + if self.match_default and boolean.state != self.default: continue yield boolean diff --git a/setools/policyrep/boolcond.py b/setools/policyrep/boolcond.py index 222feec..820de1e 100644 --- a/setools/policyrep/boolcond.py +++ b/setools/policyrep/boolcond.py @@ -49,13 +49,14 @@ class Boolean(symbol.PolicySymbol): """A Boolean.""" + @property def state(self): """The default state of the Boolean.""" return bool(self.qpol_symbol.state(self.policy)) def statement(self): """The policy statement.""" - return "bool {0} {1};".format(self, str(self.state()).lower()) + return "bool {0} {1};".format(self, str(self.state).lower()) class ConditionalExpr(symbol.PolicySymbol):