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