mirror of
https://github.com/SELinuxProject/setools
synced 2025-03-23 19:46:29 +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])
|
rule_string += "{0};".format(list(perms)[0])
|
||||||
|
|
||||||
try:
|
try:
|
||||||
cond = self.conditional
|
rule_string += " [ {0} ]".format(self.conditional)
|
||||||
except rule.RuleNotConditional:
|
except rule.RuleNotConditional:
|
||||||
pass
|
pass
|
||||||
else:
|
|
||||||
rule_string += " [ {0} ]".format(cond)
|
|
||||||
|
|
||||||
return rule_string
|
return rule_string
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user