test
All checks were successful
Build and Deploy MITM Webserver / build (push) Successful in 8s

This commit is contained in:
2026-02-28 23:11:55 +01:00
parent 50e56be8fd
commit 1a19a819d8

View File

@@ -33,6 +33,7 @@ class NftManager:
# Try to prefer JSON for general listing; we'll toggle off for chain-list calls. # Try to prefer JSON for general listing; we'll toggle off for chain-list calls.
try: try:
self.nft.set_json_output(True) self.nft.set_json_output(True)
self.nft.set_handle_output(True)
except Exception: except Exception:
logger.debug("set_json_output not available or ignored") logger.debug("set_json_output not available or ignored")
@@ -69,7 +70,7 @@ class NftManager:
Returns raw textual output on success, raises NftError on failure. Returns raw textual output on success, raises NftError on failure.
""" """
self.nft.set_json_output(False) # best-effort attempt to disable JSON output self.nft.set_json_output(False) # best-effort attempt to disable JSON output
res = self.cmd("list ruleset -a") res = self.cmd("list ruleset")
self.nft.set_json_output(True) # restore JSON output preference self.nft.set_json_output(True) # restore JSON output preference
if res["rc"] != 0: if res["rc"] != 0:
raise NftError(f"nft list ruleset failed: {res['stderr']}") raise NftError(f"nft list ruleset failed: {res['stderr']}")