This commit is contained in:
@@ -62,9 +62,9 @@ class NftManager:
|
||||
Raises NftError on failure or when output cannot be parsed as JSON.
|
||||
"""
|
||||
res = self.nft.json_cmd("list ruleset")
|
||||
if res["rc"] != 0:
|
||||
raise NftError(f"nft list ruleset failed: {res['stderr']}")
|
||||
return res["stdout"]
|
||||
if res[0] != 0:
|
||||
raise NftError(f"nft list ruleset failed: {res[2]}")
|
||||
return res[1]
|
||||
|
||||
def list_chain_text(self, family: str, table: str, chain: str) -> str:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user