Tweak TERule conditional rendering.

No need for the cond intermediate object.
This commit is contained in:
Chris PeBenito 2014-10-02 11:42:17 -04:00
parent 04c18218b2
commit 0d5f9cff12

View File

@ -75,11 +75,9 @@ class TERule(rule.PolicyRule):
rule_string += "{0};".format(list(perms)[0])
try:
cond = self.conditional
rule_string += " [ {0} ]".format(self.conditional)
except rule.RuleNotConditional:
pass
else:
rule_string += " [ {0} ]".format(cond)
return rule_string