We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8d5781 commit 50cd4ceCopy full SHA for 50cd4ce
core/schains/firewall/nftables.py
@@ -224,7 +224,7 @@ def remove_rule(self, rule: SChainRule) -> None:
224
output = None
225
rc, output, error = self.run_cmd(f'list chain {self.FAMILY} {self.table} {self.chain}')
226
if rc != 0:
227
- raise Exception(f'Failed to list rules: {error}')
+ raise NFTablesCmdFailedError(f'Failed to list rules: {error}')
228
229
current_rules = json.loads(output)
230
@@ -237,7 +237,7 @@ def remove_rule(self, rule: SChainRule) -> None:
237
break
238
239
if handle is None:
240
- raise Exception('Rule not found')
+ raise NFTablesCmdFailedError('Rule not found')
241
242
json_cmd = self._compose_json(
243
[
0 commit comments