From 5983b87d5f33f350c593cc9bf45446dab774cabe Mon Sep 17 00:00:00 2001 From: Chris PeBenito Date: Sun, 15 Feb 2015 17:17:58 -0500 Subject: [PATCH] Add Constraint and Validatetrans class docs. --- setools/policyrep/constraint.py | 4 ++++ 1 file changed, 4 insertions(+) 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())