Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 365708c

Browse files
nicholasmhughestwangboy
authored andcommitted
use f-strings
1 parent 54327c2 commit 365708c

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

salt/modules/nftables.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -569,9 +569,7 @@ def check(table="filter", chain=None, rule=None, family="ipv4"):
569569
return res
570570

571571
nft_family = _NFTABLES_FAMILIES[family]
572-
cmd = "{} --handle list chain {} {} {}".format(
573-
_nftables_cmd(), nft_family, table, chain
574-
)
572+
cmd = f"{_nftables_cmd()} --handle list chain {nft_family} {table} {chain}"
575573
search_rule = f"{rule} #".replace("{ ", "{? ?").replace(" }", " ?}?")
576574
out = __salt__["cmd.run"](cmd, python_shell=False)
577575
found = re.search(search_rule, out)

0 commit comments

Comments
 (0)