diff --git a/setools/policyrep/constraint.py b/setools/policyrep/constraint.py index be7e5c1..d2fead7 100644 --- a/setools/policyrep/constraint.py +++ b/setools/policyrep/constraint.py @@ -228,6 +228,8 @@ class BaseConstraint(symbol.PolicySymbol): class Constraint(BaseConstraint): + """A constraint rule (constrain/mlsconstrain).""" + def __str__(self): rule_string = "{0.ruletype} {0.tclass} ".format(self) @@ -250,5 +252,7 @@ class Constraint(BaseConstraint): class Validatetrans(BaseConstraint): + """A validatetrans rule (validatetrans/mlsvalidatetrans).""" + def __str__(self): return "{0.ruletype} {0.tclass}\n\t{1}\n);".format(self, self._build_expression())