From 3654ccf424a12667d30c70ee571d408c2de456e9 Mon Sep 17 00:00:00 2001 From: nicholasmhughes Date: Mon, 2 Dec 2024 20:06:41 -0500 Subject: [PATCH] use f-strings --- salt/modules/nftables.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/salt/modules/nftables.py b/salt/modules/nftables.py index 2ef6092e063..03094240ba6 100644 --- a/salt/modules/nftables.py +++ b/salt/modules/nftables.py @@ -569,9 +569,7 @@ def check(table="filter", chain=None, rule=None, family="ipv4"): return res nft_family = _NFTABLES_FAMILIES[family] - cmd = "{} --handle list chain {} {} {}".format( - _nftables_cmd(), nft_family, table, chain - ) + cmd = f"{_nftables_cmd()} --handle list chain {nft_family} {table} {chain}" search_rule = f"{rule} #".replace("{ ", "{? ?").replace(" }", " ?}?") out = __salt__["cmd.run"](cmd, python_shell=False) found = re.search(search_rule, out)