mirror of
https://github.com/SELinuxProject/setools
synced 2025-03-22 19:16:34 +00:00
Tweak TERule conditional rendering.
No need for the cond intermediate object.
This commit is contained in:
parent
04c18218b2
commit
0d5f9cff12
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user