From 5909bde15ec27f7e0ae9a2c42b9f36335d9383f5 Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Wed, 29 Oct 2014 21:07:59 -0400 Subject: [PATCH] Fix missed swig wrapper rebasing. --- setools/policyrep/context.py | 2 +- setools/policyrep/mls.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/setools/policyrep/context.py b/setools/policyrep/context.py index 28b1996..4218ce1 100644 --- a/setools/policyrep/context.py +++ b/setools/policyrep/context.py @@ -54,7 +54,7 @@ class Context(symbol.PolicySymbol): """The MLS portion (range) of the context.""" # without this check, qpol will segfault on MLS-disabled policies - if self.policy.has_capability(qpol.QPOL_CAP_MLS): + if self.policy.capability(qpol.QPOL_CAP_MLS): return mls.MLSRange(self.policy, self.qpol_symbol.range(self.policy)) else: raise mls.MLSDisabled("MLS is disabled, the context has no range.") diff --git a/setools/policyrep/mls.py b/setools/policyrep/mls.py index f87babb..f80cf7d 100644 --- a/setools/policyrep/mls.py +++ b/setools/policyrep/mls.py @@ -58,7 +58,7 @@ class MLSCategory(symbol.PolicySymbol): aiter = self.qpol_symbol.alias_iter(self.policy) while not aiter.isend(): yield qpol.to_str(aiter.item()) - aiter.next() + aiter.next_() # libqpol does not expose sensitivities as an individual component @@ -73,7 +73,7 @@ class MLSLevel(symbol.PolicySymbol): def __eq__(self, other): if self.policy == other.policy: - if (self.qpol_symbol.sens_name(self.policy) != other.qpol_symbol.get_sens_name(self.policy)): + if (self.qpol_symbol.sens_name(self.policy) != other.qpol_symbol.sens_name(self.policy)): return False selfcats = set(str(c) for c in self.categories()) @@ -113,7 +113,7 @@ class MLSLevel(symbol.PolicySymbol): citer = self.qpol_symbol.cat_iter(self.policy) while not citer.isend(): yield MLSCategory(self.policy, qpol.qpol_cat_from_void(citer.item())) - citer.next() + citer.next_() class MLSRange(symbol.PolicySymbol):