Skip to content

Commit b176738

Browse files
committed
Fixed return type annotation in iptables module
Changed evaluate_command_policy return type from Result to str, since Result.KEPT and Result.REPAIRED are string class attributes, not Result instances. Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
1 parent 78eef69 commit b176738

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

promise-types/iptables/iptables.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ def evaluate_promise(self, promiser: str, attributes: Dict, metadata: Dict):
231231

232232
return result, classes
233233

234-
def evaluate_command_policy(self, executable, table, chain, target) -> Result:
234+
def evaluate_command_policy(self, executable, table, chain, target) -> str:
235235
policy_rules = self._iptables_policy_rules_of(executable, table, chain)
236236
assert len(policy_rules) == 1 and len(policy_rules[0].split()) >= 1
237237

0 commit comments

Comments
 (0)